Class FeatureDatasetFactory
java.lang.Object
com.vividsolutions.jump.feature.FeatureDatasetFactory
Utility functions to create different kinds of FeatureDatasets
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic FeatureCollectioncreateFromGeometry(Collection geoms) Creates a FeatureCollection from a Collection ofGeometrysstatic FeatureDatasetcreateFromGeometry(Collection geoms, FeatureSchema featureSchema) static FeatureDatasetcreateFromGeometryWithLength(Collection geoms, String attrName) Creates a FeatureCollection from a Collection ofGeometrys and adds an attribute containing the length of the Geometry.static FeatureDatasetcreateFromGeometryWithLengthAndArea(Collection geoms, String attrNameLen, String attrNameArea) Creates a FeatureCollection from a Collection ofGeometrys and adds optional attributes containing the length and area of the Geometry.
-
Constructor Details
-
FeatureDatasetFactory
public FeatureDatasetFactory()
-
-
Method Details
-
createFromGeometry
Creates a FeatureCollection from a Collection ofGeometrys- Parameters:
geoms- a collection ofGeometrys
-
createFromGeometryWithLength
Creates a FeatureCollection from a Collection ofGeometrys and adds an attribute containing the length of the Geometry. The attribute name is given by the argumentattrName- Parameters:
geoms- a collection ofGeometrysattrName- the name to use for the length attribute
-
createFromGeometry
- Parameters:
geoms- a collection ofGeometrysfeatureSchema- 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 ofGeometrys and adds optional attributes containing the length and area of the Geometry.- Parameters:
geoms- a collection ofGeometrysattrNameLen- the name to use for the length attribute (ornullif not required)attrNameArea- the name to use for the length attribute (ornullif not required)
-