Class 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
    • Constructor Summary

      Constructors 
      Constructor Description
      GeoJSONEncoder()  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      com.fasterxml.jackson.databind.node.ObjectNode encode​(org.locationtech.jts.geom.GeometryCollection geometry, int parentSrid)  
      protected com.fasterxml.jackson.databind.node.ObjectNode encode​(org.locationtech.jts.geom.LineString geometry, int parentSrid)  
      protected com.fasterxml.jackson.databind.node.ObjectNode encode​(org.locationtech.jts.geom.MultiLineString geometry, int parentSrid)  
      protected com.fasterxml.jackson.databind.node.ObjectNode encode​(org.locationtech.jts.geom.MultiPoint geometry, int parentSrid)  
      protected com.fasterxml.jackson.databind.node.ObjectNode encode​(org.locationtech.jts.geom.MultiPolygon geometry, int parentSrid)  
      protected com.fasterxml.jackson.databind.node.ObjectNode encode​(org.locationtech.jts.geom.Point geometry, int parentSrid)  
      protected com.fasterxml.jackson.databind.node.ObjectNode encode​(org.locationtech.jts.geom.Polygon geometry, int parentSrid)  
      protected com.fasterxml.jackson.databind.node.ArrayNode encodeCoordinate​(org.locationtech.jts.geom.Coordinate coordinate)  
      protected com.fasterxml.jackson.databind.node.ArrayNode encodeCoordinates​(org.locationtech.jts.geom.CoordinateSequence coordinates)  
      protected com.fasterxml.jackson.databind.node.ArrayNode encodeCoordinates​(org.locationtech.jts.geom.LineString geometry)  
      protected com.fasterxml.jackson.databind.node.ArrayNode encodeCoordinates​(org.locationtech.jts.geom.Point geometry)  
      protected com.fasterxml.jackson.databind.node.ArrayNode encodeCoordinates​(org.locationtech.jts.geom.Polygon geometry)  
      protected int encodeCRS​(int srid, int parentSrid, com.fasterxml.jackson.databind.node.ObjectNode json)  
      protected int encodeCRS​(com.fasterxml.jackson.databind.node.ObjectNode json, org.locationtech.jts.geom.Geometry geometry, int parentSrid)  
      com.fasterxml.jackson.databind.node.ObjectNode encodeGeometry​(org.locationtech.jts.geom.Geometry value)  
      com.fasterxml.jackson.databind.node.ObjectNode encodeGeometry​(org.locationtech.jts.geom.Geometry geometry, int parentSrid)  
    • Constructor Detail

      • GeoJSONEncoder

        public GeoJSONEncoder()
    • 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)