Class FeatureUtil
- java.lang.Object
-
- org.locationtech.jts.jump.feature.FeatureUtil
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
FeatureUtil.IDComparator
Compares two Features for order based on their feature ID.
-
Constructor Summary
Constructors Constructor Description FeatureUtil()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static boolean
areAllNonSpatialAttributesNull(Feature feature)
Returns whether all attributes are null (other than the Geometry attribute, which is not checked)static void
copyAttributes(Feature a, Feature b)
Although Feature implements Cloneable, this method is useful when the two Features are implemented with different classes.static int
nextID()
Increments and returns the feature-ID counterstatic Feature
toFeature(org.locationtech.jts.geom.Geometry g, FeatureSchema schema)
Creates a new Feature from the given Geometry, with nominal values for the attributes.static List
toGeometries(Collection features)
Returns the n Geometries extracted from the given n Features
-
-
-
Method Detail
-
toFeature
public static Feature toFeature(org.locationtech.jts.geom.Geometry g, FeatureSchema schema)
Creates a new Feature from the given Geometry, with nominal values for the attributes.- Parameters:
g
- the Geometry to convertschema
- metadata for the Feature to create- Returns:
- a new Feature containing the Geometry and default values for the attributes
-
toGeometries
public static List toGeometries(Collection features)
Returns the n Geometries extracted from the given n Features
-
nextID
public static int nextID()
Increments and returns the feature-ID counter- See Also:
Feature.getID()
-
copyAttributes
public static void copyAttributes(Feature a, Feature b)
Although Feature implements Cloneable, this method is useful when the two Features are implemented with different classes.
-
areAllNonSpatialAttributesNull
public static boolean areAllNonSpatialAttributesNull(Feature feature)
Returns whether all attributes are null (other than the Geometry attribute, which is not checked)
-
-