Class FeatureCollectionUtil
java.lang.Object
org.openjump.sigle.utilities.geom.FeatureCollectionUtil
This class can check if a FeatureCollection has only one Geometry Type and in
this case, return this Geometry Type.
- Version:
- 2005-08-10
- Author:
- Erwan Bocher, Olivier Bedel, Giuseppe Aruta [2020-07-22] added two method to valid and to union by attribute a FeatureCollection
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic ArrayListstatic intstatic voidunionByAttributeValue(FeatureCollection featureCollection, String attributeName) Merge features and their geometries in the FeatureCollection given when the given attribute name contains identical valuesstatic voidMethod to make valid all the geometries of a FeatureCollection using the class MakeValidOp.
-
Constructor Details
-
FeatureCollectionUtil
public FeatureCollectionUtil()
-
-
Method Details
-
getFeatureCollectionDimension
-
getAttributesList
-
validFeatureCollection
Method to make valid all the geometries of a FeatureCollection using the class MakeValidOp. A geometry is not valid if it is not simple: This condition occurs when any of the following conditions are true: Incorrect ring orientation (polygon), self-intersection rings (polygon) self-intersection path (polyline), unclosed ring (polygon) (see also https://desktop.arcgis.com/en/arcmap/latest/extensions/data-reviewer/finding-invalid-geometry.htm for the complete list). This method should be applied before merging features viainvalid input: 'because not simple geometries will be not processed @param FeatureCollection fc' -
unionByAttributeValue
public static void unionByAttributeValue(FeatureCollection featureCollection, String attributeName) throws Exception Merge features and their geometries in the FeatureCollection given when the given attribute name contains identical values- Parameters:
featureCollection- feature collectionattributeName- attribute name- Throws:
Exception- if an Exception occurred
-