Class FeatureDatasetFactory

java.lang.Object
com.vividsolutions.jump.feature.FeatureDatasetFactory

public class FeatureDatasetFactory extends Object
Utility functions to create different kinds of FeatureDatasets
  • Constructor Details

    • FeatureDatasetFactory

      public FeatureDatasetFactory()
  • Method Details

    • createFromGeometry

      public static FeatureCollection createFromGeometry(Collection geoms)
      Creates a FeatureCollection from a Collection of Geometrys
      Parameters:
      geoms - a collection of Geometrys
    • createFromGeometryWithLength

      public static FeatureDataset createFromGeometryWithLength(Collection geoms, String attrName)
      Creates a FeatureCollection from a Collection of Geometrys and adds an attribute containing the length of the Geometry. The attribute name is given by the argument attrName
      Parameters:
      geoms - a collection of Geometrys
      attrName - the name to use for the length attribute
    • createFromGeometry

      public static FeatureDataset createFromGeometry(Collection geoms, FeatureSchema featureSchema)
      Creates a FeatureDataset from a Collection of Geometrys using the given FeatureSchema
      Parameters:
      geoms - a collection of Geometrys
      featureSchema - the schema to use for the feature collection
      Returns:
      a FeatureDataset containing features for the geometries
    • createFromGeometryWithLengthAndArea

      public static FeatureDataset createFromGeometryWithLengthAndArea(Collection geoms, String attrNameLen, String attrNameArea)
      Creates a FeatureCollection from a Collection of Geometrys and adds optional attributes containing the length and area of the Geometry.
      Parameters:
      geoms - a collection of Geometrys
      attrNameLen - the name to use for the length attribute (or null if not required)
      attrNameArea - the name to use for the length attribute (or null if not required)