Class FeatureConverter


  • public class FeatureConverter
    extends Object
    Feature Converter
    Author:
    osbornb
    • Field Detail

      • mapper

        public static final com.fasterxml.jackson.databind.ObjectMapper mapper
        Object mapper
    • Constructor Detail

      • FeatureConverter

        public FeatureConverter()
    • Method Detail

      • toFeature

        public static Feature toFeature​(String content)
        Convert the string content to a feature
        Parameters:
        content - string content
        Returns:
        feature
      • toFeature

        public static Feature toFeature​(Object value)
        Convert the object value to a feature
        Parameters:
        value - object value
        Returns:
        feature
      • toFeature

        public static Feature toFeature​(com.fasterxml.jackson.databind.JsonNode tree)
        Convert the JSON tree to a feature
        Parameters:
        tree - tree node
        Returns:
        feature
      • toFeature

        public static Feature toFeature​(Geometry simpleGeometry)
        Convert a simple geometry to a feature
        Parameters:
        simpleGeometry - simple geometry
        Returns:
        feature
      • toFeatureCollection

        public static FeatureCollection toFeatureCollection​(String content)
        Convert the string content to a feature collection
        Parameters:
        content - string content
        Returns:
        feature collection
      • toFeatureCollection

        public static FeatureCollection toFeatureCollection​(Object value)
        Convert the object value to a feature collection
        Parameters:
        value - object value
        Returns:
        feature collection
      • toFeatureCollection

        public static FeatureCollection toFeatureCollection​(com.fasterxml.jackson.databind.JsonNode tree)
        Convert the JSON tree to a feature collection
        Parameters:
        tree - tree node
        Returns:
        feature collection
      • toFeatureCollection

        public static FeatureCollection toFeatureCollection​(Geometry simpleGeometry)
        Convert a simple geometry to a feature collection
        Parameters:
        simpleGeometry - simple geometry
        Returns:
        feature collection
      • toFeatureCollection

        public static FeatureCollection toFeatureCollection​(Collection<Geometry> simpleGeometries)
        Convert simple geometries to a feature collection
        Parameters:
        simpleGeometries - simple geometries
        Returns:
        feature collection
      • toGeometry

        public static Geometry toGeometry​(String content)
        Convert the string content to a geometry
        Parameters:
        content - string content
        Returns:
        geometry
      • toGeometry

        public static Geometry toGeometry​(Object value)
        Convert the object value to a geometry
        Parameters:
        value - object value
        Returns:
        geometry
      • toGeometry

        public static Geometry toGeometry​(com.fasterxml.jackson.databind.JsonNode tree)
        Convert the JSON tree to a Geometry
        Parameters:
        tree - tree node
        Returns:
        geometry
      • toGeometry

        public static Geometry toGeometry​(Geometry simpleGeometry)
        Convert a simple geometry to a GeoJSON geometry
        Parameters:
        simpleGeometry - simple geometry
        Returns:
        geometry
      • toGeoJsonObject

        public static GeoJsonObject toGeoJsonObject​(String content)
        Convert the string content to a GeoJSON object
        Parameters:
        content - string content
        Returns:
        GeoJSON object
      • toGeoJsonObject

        public static GeoJsonObject toGeoJsonObject​(Object value)
        Convert the object value to a GeoJSON object
        Parameters:
        value - object value
        Returns:
        GeoJSON object
      • toGeoJsonObject

        public static GeoJsonObject toGeoJsonObject​(com.fasterxml.jackson.databind.JsonNode tree)
        Convert the JSON tree to a GeoJSON object
        Parameters:
        tree - tree node
        Returns:
        GeoJSON object
      • toSimpleGeometry

        public static Geometry toSimpleGeometry​(String content)
        Convert the string content to a simple geometry
        Parameters:
        content - string content
        Returns:
        simple geometry
        Since:
        3.3.3
      • toSimpleGeometry

        public static Geometry toSimpleGeometry​(Object value)
        Convert the object value to a simple geometry
        Parameters:
        value - object value
        Returns:
        simple geometry
        Since:
        3.3.3
      • toSimpleGeometry

        public static Geometry toSimpleGeometry​(com.fasterxml.jackson.databind.JsonNode tree)
        Convert the JSON tree to a simple geometry
        Parameters:
        tree - tree node
        Returns:
        simple geometry
        Since:
        3.3.3
      • toSimpleGeometry

        public static Geometry toSimpleGeometry​(GeoJsonObject geoJson)
        Convert the GeoJSON object to a simple geometry
        Parameters:
        geoJson - GeoJSON object
        Returns:
        simple geometry
        Since:
        3.3.3
      • toMap

        public static Map<String,​Object> toMap​(GeoJsonObject object)
        Convert the GeoJSON object to an object map
        Parameters:
        object - GeoJSON object
        Returns:
        object map
      • toMap

        public static Map<String,​Object> toMap​(Geometry simpleGeometry)
        Convert the simple geometry to an object map
        Parameters:
        simpleGeometry - simple geometry
        Returns:
        object map
      • toStringValue

        public static String toStringValue​(Object object)
        Convert the object to a string value
        Parameters:
        object - object
        Returns:
        string value
      • toStringValue

        public static String toStringValue​(Geometry simpleGeometry)
        Convert the simple geometry to a string value
        Parameters:
        simpleGeometry - simple geometry
        Returns:
        string value
      • toTypedObject

        public static <T> T toTypedObject​(Class<T> type,
                                          String content)
        Convert the string content to a typed object
        Type Parameters:
        T - object class type
        Parameters:
        type - object type
        content - string content
        Returns:
        typed object
      • toTypedObject

        public static <T> T toTypedObject​(Class<T> type,
                                          Object value)
        Convert the object value to a typed object
        Type Parameters:
        T - object class type
        Parameters:
        type - object type
        value - object value
        Returns:
        typed object
      • toTypedObject

        public static <T> T toTypedObject​(Class<T> type,
                                          com.fasterxml.jackson.databind.JsonNode tree)
        Convert the JSON tree to a typed object
        Type Parameters:
        T - object class type
        Parameters:
        type - object type
        tree - tree node
        Returns:
        typed object