Package org.n52.io.geojson
Class GeoJSONEncoder
java.lang.Object
org.n52.io.geojson.GeoJSONEncoder
borrwoed from
https://github.com/52North/SOS/blob/4.3.4/coding/json/src/main/java/org/n52/sos/encode/json/impl/GeoJSONEncoder.java
- Since:
- 2.0
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptioncom.fasterxml.jackson.databind.node.ObjectNodeencode(org.locationtech.jts.geom.GeometryCollection geometry, int parentSrid) protected com.fasterxml.jackson.databind.node.ObjectNodeencode(org.locationtech.jts.geom.LineString geometry, int parentSrid) protected com.fasterxml.jackson.databind.node.ObjectNodeencode(org.locationtech.jts.geom.MultiLineString geometry, int parentSrid) protected com.fasterxml.jackson.databind.node.ObjectNodeencode(org.locationtech.jts.geom.MultiPoint geometry, int parentSrid) protected com.fasterxml.jackson.databind.node.ObjectNodeencode(org.locationtech.jts.geom.MultiPolygon geometry, int parentSrid) protected com.fasterxml.jackson.databind.node.ObjectNodeencode(org.locationtech.jts.geom.Point geometry, int parentSrid) protected com.fasterxml.jackson.databind.node.ObjectNodeencode(org.locationtech.jts.geom.Polygon geometry, int parentSrid) protected com.fasterxml.jackson.databind.node.ArrayNodeencodeCoordinate(org.locationtech.jts.geom.Coordinate coordinate) protected com.fasterxml.jackson.databind.node.ArrayNodeencodeCoordinates(org.locationtech.jts.geom.CoordinateSequence coordinates) protected com.fasterxml.jackson.databind.node.ArrayNodeencodeCoordinates(org.locationtech.jts.geom.LineString geometry) protected com.fasterxml.jackson.databind.node.ArrayNodeencodeCoordinates(org.locationtech.jts.geom.Point geometry) protected com.fasterxml.jackson.databind.node.ArrayNodeencodeCoordinates(org.locationtech.jts.geom.Polygon geometry) protected intencodeCRS(int srid, int parentSrid, com.fasterxml.jackson.databind.node.ObjectNode json) protected intencodeCRS(com.fasterxml.jackson.databind.node.ObjectNode json, org.locationtech.jts.geom.Geometry geometry, int parentSrid) com.fasterxml.jackson.databind.node.ObjectNodeencodeGeometry(org.locationtech.jts.geom.Geometry value) com.fasterxml.jackson.databind.node.ObjectNodeencodeGeometry(org.locationtech.jts.geom.Geometry geometry, int parentSrid)
-
Field Details
-
DEFAULT_SRID
public static final int DEFAULT_SRID- See Also:
-
SRID_LINK_PREFIX
- See Also:
-
-
Constructor Details
-
GeoJSONEncoder
public GeoJSONEncoder()
-
-
Method Details
-
encodeGeometry
public com.fasterxml.jackson.databind.node.ObjectNode encodeGeometry(org.locationtech.jts.geom.Geometry value) throws GeoJSONException - Throws:
GeoJSONException
-
encodeGeometry
public com.fasterxml.jackson.databind.node.ObjectNode encodeGeometry(org.locationtech.jts.geom.Geometry geometry, int parentSrid) throws GeoJSONException - Throws:
GeoJSONException
-
encode
protected com.fasterxml.jackson.databind.node.ObjectNode encode(org.locationtech.jts.geom.Point geometry, int parentSrid) -
encode
protected com.fasterxml.jackson.databind.node.ObjectNode encode(org.locationtech.jts.geom.LineString geometry, int parentSrid) -
encode
protected com.fasterxml.jackson.databind.node.ObjectNode encode(org.locationtech.jts.geom.Polygon geometry, int parentSrid) -
encode
protected com.fasterxml.jackson.databind.node.ObjectNode encode(org.locationtech.jts.geom.MultiPoint geometry, int parentSrid) -
encode
protected com.fasterxml.jackson.databind.node.ObjectNode encode(org.locationtech.jts.geom.MultiLineString geometry, int parentSrid) -
encode
protected com.fasterxml.jackson.databind.node.ObjectNode encode(org.locationtech.jts.geom.MultiPolygon geometry, int parentSrid) -
encode
public com.fasterxml.jackson.databind.node.ObjectNode encode(org.locationtech.jts.geom.GeometryCollection geometry, int parentSrid) throws GeoJSONException - Throws:
GeoJSONException
-
encodeCoordinate
protected com.fasterxml.jackson.databind.node.ArrayNode encodeCoordinate(org.locationtech.jts.geom.Coordinate coordinate) -
encodeCoordinates
protected com.fasterxml.jackson.databind.node.ArrayNode encodeCoordinates(org.locationtech.jts.geom.CoordinateSequence coordinates) -
encodeCoordinates
protected com.fasterxml.jackson.databind.node.ArrayNode encodeCoordinates(org.locationtech.jts.geom.Point geometry) -
encodeCoordinates
protected com.fasterxml.jackson.databind.node.ArrayNode encodeCoordinates(org.locationtech.jts.geom.LineString geometry) -
encodeCoordinates
protected com.fasterxml.jackson.databind.node.ArrayNode encodeCoordinates(org.locationtech.jts.geom.Polygon geometry) -
encodeCRS
protected int encodeCRS(com.fasterxml.jackson.databind.node.ObjectNode json, org.locationtech.jts.geom.Geometry geometry, int parentSrid) -
encodeCRS
protected int encodeCRS(int srid, int parentSrid, com.fasterxml.jackson.databind.node.ObjectNode json)
-