Package org.n52.svalbard.encode.json
Class GeoJSONEncoder
- java.lang.Object
-
- org.n52.svalbard.encode.json.JSONEncoder<org.locationtech.jts.geom.Geometry>
-
- org.n52.svalbard.encode.json.GeoJSONEncoder
-
- All Implemented Interfaces:
Component<EncoderKey>,Keyed<EncoderKey>,Encoder<com.fasterxml.jackson.databind.JsonNode,org.locationtech.jts.geom.Geometry>
public class GeoJSONEncoder extends JSONEncoder<org.locationtech.jts.geom.Geometry>
TODO JavaDoc- Since:
- 1.0.0
-
-
Field Summary
Fields Modifier and Type Field Description static intDEFAULT_SRIDstatic StringSRID_LINK_PREFIX-
Fields inherited from class org.n52.svalbard.encode.json.JSONEncoder
CONTENT_TYPE
-
-
Constructor Summary
Constructors Constructor Description GeoJSONEncoder()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description com.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)protected com.fasterxml.jackson.databind.node.ObjectNodeencodeGeometry(org.locationtech.jts.geom.Geometry geometry, int parentSrid)com.fasterxml.jackson.databind.node.ObjectNodeencodeJSON(org.locationtech.jts.geom.Geometry value)-
Methods inherited from class org.n52.svalbard.encode.json.JSONEncoder
encode, encode, encode, encode, encodeAsString, encodeChecked, encodeChecked, encodeCodeType, encodeCodeType, encodeCodeWithAuthority, encodeList, encodeListChecked, encodeObjectsToJson, encodeObjectToJson, encodeOptional, encodeOptional, encodeOptionalChecked, encodeOptionalChecked, encodeOwsCode, encodeURI, getContentType, getEncoderRepository, getKeys, nodeFactory, setEncoderRepository, toJsonArray, toJsonObject
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.n52.svalbard.encode.Encoder
getSupportedTypes
-
-
-
-
Field Detail
-
DEFAULT_SRID
public static final int DEFAULT_SRID
- See Also:
- Constant Field Values
-
SRID_LINK_PREFIX
public static final String SRID_LINK_PREFIX
- See Also:
- Constant Field Values
-
-
Method Detail
-
encodeJSON
public com.fasterxml.jackson.databind.node.ObjectNode encodeJSON(org.locationtech.jts.geom.Geometry value) throws JSONEncodingException- Specified by:
encodeJSONin classJSONEncoder<org.locationtech.jts.geom.Geometry>- Throws:
JSONEncodingException
-
encodeGeometry
protected com.fasterxml.jackson.databind.node.ObjectNode encodeGeometry(org.locationtech.jts.geom.Geometry geometry, int parentSrid) throws JSONEncodingException- Throws:
JSONEncodingException
-
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 JSONEncodingException- Throws:
JSONEncodingException
-
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)
-
-