Class ConvertHelper

    • Constructor Detail

      • ConvertHelper

        public ConvertHelper()
        Instantiates a new convert helper.
      • ConvertHelper

        public ConvertHelper​(org.locationtech.jts.geom.GeometryFactory geometryFactory)
        Instantiates a new convert helper.
        Parameters:
        geometryFactory - the geometry factory
      • ConvertHelper

        public ConvertHelper​(org.locationtech.jts.geom.GeometryFactory geometryFactory,
                             boolean useBigDecimal)
        Instantiates a new convert helper.
        Parameters:
        geometryFactory - the geometry factory
        useBigDecimal - use BigDecimal (recommended for JSON, set to false for MongoDB)
    • Method Detail

      • getGeometryFactory

        public org.locationtech.jts.geom.GeometryFactory getGeometryFactory()
        Gets geometry factory.
        Returns:
        the geometry factory
      • createPoint

        public org.locationtech.jts.geom.Point createPoint​(List<Object> coordinates)
        Create point.
        Parameters:
        coordinates - the coordinates
        Returns:
        the point
      • createLineString

        public org.locationtech.jts.geom.LineString createLineString​(List<Object> coordinates)
        Create line string.
        Parameters:
        coordinates - the coordinates
        Returns:
        the line string
      • createPolygon

        public org.locationtech.jts.geom.Polygon createPolygon​(List<Object> coordinates)
        Create polygon.
        Parameters:
        coordinates - the coordinates
        Returns:
        the polygon
      • createMultiPoint

        public org.locationtech.jts.geom.MultiPoint createMultiPoint​(List<Object> coordinates)
        Create multi point.
        Parameters:
        coordinates - the coordinates
        Returns:
        the multi point
      • createMultiLineString

        public org.locationtech.jts.geom.MultiLineString createMultiLineString​(List<Object> coordinates)
        Create multi line string.
        Parameters:
        coordinates - the coordinates
        Returns:
        the multi line string
      • createMultiPolygon

        public org.locationtech.jts.geom.MultiPolygon createMultiPolygon​(List<Object> coordinates)
        Create multi polygon.
        Parameters:
        coordinates - the coordinates
        Returns:
        the multi polygon
      • createGeometryCollection

        public org.locationtech.jts.geom.GeometryCollection createGeometryCollection​(List<org.locationtech.jts.geom.Geometry> geometries)
        Create geometry collection.
        Parameters:
        geometries - the geometries
        Returns:
        the geometry collection
      • create

        public Map<String,​Object> create​(org.locationtech.jts.geom.Geometry geometry)
        Create json map.
        Parameters:
        geometry - the geometry
        Returns:
        the map