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>

public class GeoJSONDecoder extends JSONDecoder<org.locationtech.jts.geom.Geometry>
TODO JavaDoc
Since:
1.0.0
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final int
     
    static final int
     
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    protected org.locationtech.jts.geom.Coordinate
    decodeCoordinate(com.fasterxml.jackson.databind.JsonNode node)
     
    protected org.locationtech.jts.geom.Coordinate[]
    decodeCoordinates(com.fasterxml.jackson.databind.JsonNode node)
     
    protected org.locationtech.jts.geom.GeometryFactory
    decodeCRS(com.fasterxml.jackson.databind.JsonNode node, org.locationtech.jts.geom.GeometryFactory factory)
     
    protected org.locationtech.jts.geom.Geometry
    decodeGeometry(Object o, org.locationtech.jts.geom.GeometryFactory parentFactory)
     
    protected org.locationtech.jts.geom.GeometryCollection
    decodeGeometryCollection(com.fasterxml.jackson.databind.JsonNode node, org.locationtech.jts.geom.GeometryFactory fac)
     
    org.locationtech.jts.geom.Geometry
    decodeJSON(com.fasterxml.jackson.databind.JsonNode node, boolean validate)
     
    protected org.locationtech.jts.geom.LineString
    decodeLineString(com.fasterxml.jackson.databind.JsonNode node, org.locationtech.jts.geom.GeometryFactory fac)
     
    protected org.locationtech.jts.geom.GeometryFactory
    decodeLinkedCRS(com.fasterxml.jackson.databind.JsonNode properties, org.locationtech.jts.geom.GeometryFactory factory)
     
    protected org.locationtech.jts.geom.MultiLineString
    decodeMultiLineString(com.fasterxml.jackson.databind.JsonNode node, org.locationtech.jts.geom.GeometryFactory fac)
     
    protected org.locationtech.jts.geom.MultiPoint
    decodeMultiPoint(com.fasterxml.jackson.databind.JsonNode node, org.locationtech.jts.geom.GeometryFactory fac)
     
    protected org.locationtech.jts.geom.MultiPolygon
    decodeMultiPolygon(com.fasterxml.jackson.databind.JsonNode node, org.locationtech.jts.geom.GeometryFactory fac)
     
    protected org.locationtech.jts.geom.GeometryFactory
    decodeNamedCRS(com.fasterxml.jackson.databind.JsonNode properties, org.locationtech.jts.geom.GeometryFactory factory)
     
    protected org.locationtech.jts.geom.Point
    decodePoint(com.fasterxml.jackson.databind.JsonNode node, org.locationtech.jts.geom.GeometryFactory fac)
     
    protected org.locationtech.jts.geom.Polygon
    decodePolygon(com.fasterxml.jackson.databind.JsonNode node, org.locationtech.jts.geom.GeometryFactory fac)
     
    protected org.locationtech.jts.geom.Polygon
    decodePolygonCoordinates(com.fasterxml.jackson.databind.JsonNode coordinates, org.locationtech.jts.geom.GeometryFactory fac)
     
    protected org.locationtech.jts.geom.GeometryFactory
    getGeometryFactory(int srid, org.locationtech.jts.geom.GeometryFactory factory)
     
    protected org.locationtech.jts.geom.GeometryFactory
    getGeometryFactory(com.fasterxml.jackson.databind.JsonNode node, org.locationtech.jts.geom.GeometryFactory factory)
     
    protected String
    getType(com.fasterxml.jackson.databind.JsonNode node)
     
    protected boolean
    isNumber(com.fasterxml.jackson.databind.JsonNode x)
     
    protected com.fasterxml.jackson.databind.JsonNode
    requireCoordinates(com.fasterxml.jackson.databind.JsonNode node)
     

    Methods inherited from class org.n52.svalbard.decode.AbstractDelegatingDecoder

    getDecoder, getDecoderRepository, setDecoderRepository

    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.decode.Decoder

    getSupportedTypes
  • Field Details

  • 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:
      decodeJSON in class JSONDecoder<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)