Package com.mapbox.geojson
Interface GeoJson
-
- All Superinterfaces:
java.io.Serializable
- All Known Subinterfaces:
CoordinateContainer<T>,Geometry
- All Known Implementing Classes:
Feature,FeatureCollection,GeometryCollection,LineString,MultiLineString,MultiPoint,MultiPolygon,Point,Polygon
public interface GeoJson extends java.io.SerializableGeneric implementation for all GeoJson objects defining common traits that each GeoJson object has. This logic is carried over toGeometrywhich is an interface which all seven GeoJson geometries implement.- Since:
- 1.0.0
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description BoundingBoxbbox()A GeoJson object MAY have a member named "bbox" to include information on the coordinate range for its Geometries, Features, or FeatureCollections.java.lang.StringtoJson()This takes the currently defined values found inside the GeoJson instance and converts it to a GeoJson string.java.lang.Stringtype()This describes the type of GeoJson geometry, Feature, or FeatureCollection this object is.
-
-
-
Method Detail
-
type
java.lang.String type()
This describes the type of GeoJson geometry, Feature, or FeatureCollection this object is. Every GeoJson Object will have this defined once an instance is created and will never return null.- Returns:
- a String which describes the type of geometry, for this object it will always return
Feature - Since:
- 1.0.0
-
toJson
java.lang.String toJson()
This takes the currently defined values found inside the GeoJson instance and converts it to a GeoJson string.- Returns:
- a JSON string which represents this Feature
- Since:
- 1.0.0
-
bbox
BoundingBox bbox()
A GeoJson object MAY have a member named "bbox" to include information on the coordinate range for its Geometries, Features, or FeatureCollections. The value of the bbox member MUST be an array of length 2*n where n is the number of dimensions represented in the contained geometries, with all axes of the most southwesterly point followed by all axes of the more northeasterly point. The axes order of a bbox follows the axes order of geometries.- Returns:
- a double array with the length 2*n where n is the number of dimensions represented in the contained geometries
- Since:
- 3.0.0
-
-