Class FeatureCollectionUtil
- java.lang.Object
-
- org.openjump.sigle.utilities.geom.FeatureCollectionUtil
-
public class FeatureCollectionUtil extends Object
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 Constructor Description FeatureCollectionUtil()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static ArrayList
getAttributesList(FeatureCollection fc)
static int
getFeatureCollectionDimension(FeatureCollection fc)
static void
unionByAttributeValue(FeatureCollection featureCollection, String attributeName)
Merge features and their geometries in the FeatureCollection given when the given attribute name contains identical valuesstatic void
validFeatureCollection(FeatureCollection fc)
Method to make valid all the geometries of a FeatureCollection using the class MakeValidOp.
-
-
-
Method Detail
-
getFeatureCollectionDimension
public static int getFeatureCollectionDimension(FeatureCollection fc)
-
getAttributesList
public static ArrayList getAttributesList(FeatureCollection fc)
-
validFeatureCollection
public static void validFeatureCollection(FeatureCollection fc)
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 viabecause not simple geometries will be not processed
- Parameters:
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
-
-