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 Details

    • FeatureCollectionUtil

      public FeatureCollectionUtil()
  • Method Details

    • 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 via invalid 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 collection
      attributeName - attribute name
      Throws:
      Exception - if an Exception occurred