Package org.n52.svalbard.decode.json
Class GeoJSONDecoder
java.lang.Object
org.n52.svalbard.decode.AbstractDelegatingDecoder<org.locationtech.jts.geom.Geometry,com.fasterxml.jackson.databind.JsonNode>
org.n52.svalbard.decode.json.JSONDecoder<org.locationtech.jts.geom.Geometry>
org.n52.svalbard.decode.json.GeoJSONDecoder
- All Implemented Interfaces:
Component<DecoderKey>,Keyed<DecoderKey>,Decoder<org.locationtech.jts.geom.Geometry,com.fasterxml.jackson.databind.JsonNode>
TODO JavaDoc
- Since:
- 1.0.0
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected org.locationtech.jts.geom.CoordinatedecodeCoordinate(com.fasterxml.jackson.databind.JsonNode node) protected org.locationtech.jts.geom.Coordinate[]decodeCoordinates(com.fasterxml.jackson.databind.JsonNode node) protected org.locationtech.jts.geom.GeometryFactorydecodeCRS(com.fasterxml.jackson.databind.JsonNode node, org.locationtech.jts.geom.GeometryFactory factory) protected org.locationtech.jts.geom.GeometrydecodeGeometry(Object o, org.locationtech.jts.geom.GeometryFactory parentFactory) protected org.locationtech.jts.geom.GeometryCollectiondecodeGeometryCollection(com.fasterxml.jackson.databind.JsonNode node, org.locationtech.jts.geom.GeometryFactory fac) org.locationtech.jts.geom.GeometrydecodeJSON(com.fasterxml.jackson.databind.JsonNode node, boolean validate) protected org.locationtech.jts.geom.LineStringdecodeLineString(com.fasterxml.jackson.databind.JsonNode node, org.locationtech.jts.geom.GeometryFactory fac) protected org.locationtech.jts.geom.GeometryFactorydecodeLinkedCRS(com.fasterxml.jackson.databind.JsonNode properties, org.locationtech.jts.geom.GeometryFactory factory) protected org.locationtech.jts.geom.MultiLineStringdecodeMultiLineString(com.fasterxml.jackson.databind.JsonNode node, org.locationtech.jts.geom.GeometryFactory fac) protected org.locationtech.jts.geom.MultiPointdecodeMultiPoint(com.fasterxml.jackson.databind.JsonNode node, org.locationtech.jts.geom.GeometryFactory fac) protected org.locationtech.jts.geom.MultiPolygondecodeMultiPolygon(com.fasterxml.jackson.databind.JsonNode node, org.locationtech.jts.geom.GeometryFactory fac) protected org.locationtech.jts.geom.GeometryFactorydecodeNamedCRS(com.fasterxml.jackson.databind.JsonNode properties, org.locationtech.jts.geom.GeometryFactory factory) protected org.locationtech.jts.geom.PointdecodePoint(com.fasterxml.jackson.databind.JsonNode node, org.locationtech.jts.geom.GeometryFactory fac) protected org.locationtech.jts.geom.PolygondecodePolygon(com.fasterxml.jackson.databind.JsonNode node, org.locationtech.jts.geom.GeometryFactory fac) protected org.locationtech.jts.geom.PolygondecodePolygonCoordinates(com.fasterxml.jackson.databind.JsonNode coordinates, org.locationtech.jts.geom.GeometryFactory fac) protected org.locationtech.jts.geom.GeometryFactorygetGeometryFactory(int srid, org.locationtech.jts.geom.GeometryFactory factory) protected org.locationtech.jts.geom.GeometryFactorygetGeometryFactory(com.fasterxml.jackson.databind.JsonNode node, org.locationtech.jts.geom.GeometryFactory factory) protected StringgetType(com.fasterxml.jackson.databind.JsonNode node) protected booleanisNumber(com.fasterxml.jackson.databind.JsonNode x) protected com.fasterxml.jackson.databind.JsonNoderequireCoordinates(com.fasterxml.jackson.databind.JsonNode node) Methods inherited from class org.n52.svalbard.decode.json.JSONDecoder
decode, decodeJsonToObject, decodeJsonToObjectList, getKeys, parseCodeType, parseCodeWithAuthority, parseDateTime, parseTime, parseTimeInstant, parseTimePeriodMethods inherited from class org.n52.svalbard.decode.AbstractDelegatingDecoder
getDecoder, getDecoderRepository, setDecoderRepositoryMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.n52.svalbard.decode.Decoder
getSupportedTypes
-
Field Details
-
DIM_2D
public static final int DIM_2D- See Also:
-
DIM_3D
public static final int DIM_3D- See Also:
-
-
Constructor Details
-
GeoJSONDecoder
public GeoJSONDecoder()
-
-
Method Details
-
decodeJSON
public org.locationtech.jts.geom.Geometry decodeJSON(com.fasterxml.jackson.databind.JsonNode node, boolean validate) throws DecodingException - Specified by:
decodeJSONin classJSONDecoder<org.locationtech.jts.geom.Geometry>- Throws:
DecodingException
-
decodeCoordinates
protected org.locationtech.jts.geom.Coordinate[] decodeCoordinates(com.fasterxml.jackson.databind.JsonNode node) throws GeoJSONDecodingException - Throws:
GeoJSONDecodingException
-
decodePolygonCoordinates
protected org.locationtech.jts.geom.Polygon decodePolygonCoordinates(com.fasterxml.jackson.databind.JsonNode coordinates, org.locationtech.jts.geom.GeometryFactory fac) throws GeoJSONDecodingException - Throws:
GeoJSONDecodingException
-
decodeGeometry
protected org.locationtech.jts.geom.Geometry decodeGeometry(Object o, org.locationtech.jts.geom.GeometryFactory parentFactory) throws GeoJSONDecodingException - Throws:
GeoJSONDecodingException
-
decodeMultiLineString
protected org.locationtech.jts.geom.MultiLineString decodeMultiLineString(com.fasterxml.jackson.databind.JsonNode node, org.locationtech.jts.geom.GeometryFactory fac) throws GeoJSONDecodingException - Throws:
GeoJSONDecodingException
-
decodeLineString
protected org.locationtech.jts.geom.LineString decodeLineString(com.fasterxml.jackson.databind.JsonNode node, org.locationtech.jts.geom.GeometryFactory fac) throws GeoJSONDecodingException - Throws:
GeoJSONDecodingException
-
decodeMultiPoint
protected org.locationtech.jts.geom.MultiPoint decodeMultiPoint(com.fasterxml.jackson.databind.JsonNode node, org.locationtech.jts.geom.GeometryFactory fac) throws GeoJSONDecodingException - Throws:
GeoJSONDecodingException
-
decodePoint
protected org.locationtech.jts.geom.Point decodePoint(com.fasterxml.jackson.databind.JsonNode node, org.locationtech.jts.geom.GeometryFactory fac) throws GeoJSONDecodingException - Throws:
GeoJSONDecodingException
-
decodePolygon
protected org.locationtech.jts.geom.Polygon decodePolygon(com.fasterxml.jackson.databind.JsonNode node, org.locationtech.jts.geom.GeometryFactory fac) throws GeoJSONDecodingException - Throws:
GeoJSONDecodingException
-
decodeMultiPolygon
protected org.locationtech.jts.geom.MultiPolygon decodeMultiPolygon(com.fasterxml.jackson.databind.JsonNode node, org.locationtech.jts.geom.GeometryFactory fac) throws GeoJSONDecodingException - Throws:
GeoJSONDecodingException
-
decodeGeometryCollection
protected org.locationtech.jts.geom.GeometryCollection decodeGeometryCollection(com.fasterxml.jackson.databind.JsonNode node, org.locationtech.jts.geom.GeometryFactory fac) throws GeoJSONDecodingException - Throws:
GeoJSONDecodingException
-
decodeCRS
protected org.locationtech.jts.geom.GeometryFactory decodeCRS(com.fasterxml.jackson.databind.JsonNode node, org.locationtech.jts.geom.GeometryFactory factory) throws GeoJSONDecodingException - Throws:
GeoJSONDecodingException
-
decodeNamedCRS
protected org.locationtech.jts.geom.GeometryFactory decodeNamedCRS(com.fasterxml.jackson.databind.JsonNode properties, org.locationtech.jts.geom.GeometryFactory factory) throws GeoJSONDecodingException - Throws:
GeoJSONDecodingException
-
decodeLinkedCRS
protected org.locationtech.jts.geom.GeometryFactory decodeLinkedCRS(com.fasterxml.jackson.databind.JsonNode properties, org.locationtech.jts.geom.GeometryFactory factory) throws GeoJSONDecodingException - Throws:
GeoJSONDecodingException
-
decodeCoordinate
protected org.locationtech.jts.geom.Coordinate decodeCoordinate(com.fasterxml.jackson.databind.JsonNode node) throws GeoJSONDecodingException - Throws:
GeoJSONDecodingException
-
requireCoordinates
protected com.fasterxml.jackson.databind.JsonNode requireCoordinates(com.fasterxml.jackson.databind.JsonNode node) throws GeoJSONDecodingException - Throws:
GeoJSONDecodingException
-
getGeometryFactory
protected org.locationtech.jts.geom.GeometryFactory getGeometryFactory(com.fasterxml.jackson.databind.JsonNode node, org.locationtech.jts.geom.GeometryFactory factory) throws GeoJSONDecodingException - Throws:
GeoJSONDecodingException
-
getGeometryFactory
protected org.locationtech.jts.geom.GeometryFactory getGeometryFactory(int srid, org.locationtech.jts.geom.GeometryFactory factory) -
getType
protected String getType(com.fasterxml.jackson.databind.JsonNode node) throws GeoJSONDecodingException - Throws:
GeoJSONDecodingException
-
isNumber
protected boolean isNumber(com.fasterxml.jackson.databind.JsonNode x)
-