Package org.n52.io.geojson
Class GeoJSONEncoder
- java.lang.Object
-
- org.n52.io.geojson.GeoJSONEncoder
-
public class GeoJSONEncoder extends Object
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 Modifier and Type Field Description static intDEFAULT_SRIDstatic StringSRID_LINK_PREFIX
-
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)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 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
-
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)
-
-