Package com.massifmaps.geometry
Class Feature
java.lang.Object
com.massifmaps.geometry.Feature
- Direct Known Subclasses:
VectorTileFeature
A feature consisting of geometry and properties.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanChecks if this object is equal to the specified object.Returns the geometry of the feature.Returns the feature's geometry as a GeoJSON string, in its own coordinates.
Serialising a geometry otherwise means constructing a GeoJSONGeometryWriter in the
binding, which every binding then does differently and, in a scripting one, slowly.Returns the properties of the feature.inthashCode()Returns the hash value of this object.
-
Constructor Details
-
Feature
Constructs a Feature object from geometry and properties.- Parameters:
geometry- The geometry of the feature.properties- The properties of the feature.
-
-
Method Details
-
equals
Checks if this object is equal to the specified object. -
hashCode
public int hashCode()Returns the hash value of this object. -
getGeometry
Returns the geometry of the feature.- Returns:
- The geometry of the feature.
-
getProperties
Returns the properties of the feature.- Returns:
- The properties of the feature.
-
getGeometryGeoJSON
Returns the feature's geometry as a GeoJSON string, in its own coordinates.
Serialising a geometry otherwise means constructing a GeoJSONGeometryWriter in the
binding, which every binding then does differently and, in a scripting one, slowly.- Returns:
- The geometry as GeoJSON, or an empty string when there is no geometry.
-