Package org.bremersee.geojson
Class GeoJsonFeature<G extends org.locationtech.jts.geom.Geometry,P>
java.lang.Object
org.bremersee.geojson.model.UnknownAware
org.bremersee.geojson.GeoJsonFeature<G,P>
- Type Parameters:
G- the geometry type parameterP- the properties type parameter
A GeoJSON object with the type
Feature (see
rfc7946 section 3.2).- Author:
- Christian Bremer
-
Constructor Summary
ConstructorsConstructorDescriptionGeoJsonFeature(String id, double[] bbox, G geometry, P properties) Instantiates a new geo json feature.GeoJsonFeature(String id, G geometry, boolean calculateBounds, P properties) Instantiates a new geo json feature. -
Method Summary
Modifier and TypeMethodDescriptionbooleandouble[]getBbox()Return the bounding box of the GeoJSON object ornullif there is no such object (see Bounding Box).Return the geometry object of this GeoJSON feature.getId()Return the id of this GeoJSON feature ornullif there is no id available.Gets properties.final StringgetType()Gets type.inthashCode()toString()Methods inherited from class org.bremersee.geojson.model.UnknownAware
findUnknown, findUnknownList, findUnknownMap, hasUnknown, unknown, unknown, unknown
-
Constructor Details
-
GeoJsonFeature
Instantiates a new geo json feature.- Parameters:
id- the idbbox- the bboxgeometry- the geometryproperties- the properties
-
GeoJsonFeature
Instantiates a new geo json feature.- Parameters:
id- an optional idgeometry- the geometry of the GeoJson featurecalculateBounds- iftruethe bounding box will be calculated otherwise the bounding box will benullproperties- a map with named objects that are associated with the GeoJSON feature
-
-
Method Details
-
getType
Gets type.- Returns:
- the type
-
getId
Return the id of this GeoJSON feature ornullif there is no id available.- Returns:
- the id of this GeoJSON feature
-
getBbox
public double[] getBbox()Return the bounding box of the GeoJSON object ornullif there is no such object (see Bounding Box).- Returns:
- the bounding box
-
getGeometry
Return the geometry object of this GeoJSON feature.- Returns:
- the geometry
-
getProperties
Gets properties.- Returns:
- the properties
-
toString
-
hashCode
public int hashCode() -
equals
-