Package mil.nga.sf.geojson
Class FeatureConverter
- java.lang.Object
-
- mil.nga.sf.geojson.FeatureConverter
-
public class FeatureConverter extends Object
Feature Converter- Author:
- osbornb
-
-
Field Summary
Fields Modifier and Type Field Description static com.fasterxml.jackson.databind.ObjectMappermapperObject mapper
-
Constructor Summary
Constructors Constructor Description FeatureConverter()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static FeaturetoFeature(com.fasterxml.jackson.databind.JsonNode tree)Convert the JSON tree to a featurestatic FeaturetoFeature(Object value)Convert the object value to a featurestatic FeaturetoFeature(String content)Convert the string content to a featurestatic FeaturetoFeature(Geometry simpleGeometry)Convert a simple geometry to a featurestatic FeatureCollectiontoFeatureCollection(com.fasterxml.jackson.databind.JsonNode tree)Convert the JSON tree to a feature collectionstatic FeatureCollectiontoFeatureCollection(Object value)Convert the object value to a feature collectionstatic FeatureCollectiontoFeatureCollection(String content)Convert the string content to a feature collectionstatic FeatureCollectiontoFeatureCollection(Collection<Geometry> simpleGeometries)Convert simple geometries to a feature collectionstatic FeatureCollectiontoFeatureCollection(Geometry simpleGeometry)Convert a simple geometry to a feature collectionstatic GeoJsonObjecttoGeoJsonObject(com.fasterxml.jackson.databind.JsonNode tree)Convert the JSON tree to a GeoJSON objectstatic GeoJsonObjecttoGeoJsonObject(Object value)Convert the object value to a GeoJSON objectstatic GeoJsonObjecttoGeoJsonObject(String content)Convert the string content to a GeoJSON objectstatic GeometrytoGeometry(com.fasterxml.jackson.databind.JsonNode tree)Convert the JSON tree to a Geometrystatic GeometrytoGeometry(Object value)Convert the object value to a geometrystatic GeometrytoGeometry(String content)Convert the string content to a geometrystatic GeometrytoGeometry(Geometry simpleGeometry)Convert a simple geometry to a GeoJSON geometrystatic Map<String,Object>toMap(GeoJsonObject object)Convert the GeoJSON object to an object mapstatic Map<String,Object>toMap(Geometry simpleGeometry)Convert the simple geometry to an object mapstatic GeometrytoSimpleGeometry(com.fasterxml.jackson.databind.JsonNode tree)Convert the JSON tree to a simple geometrystatic GeometrytoSimpleGeometry(Object value)Convert the object value to a simple geometrystatic GeometrytoSimpleGeometry(String content)Convert the string content to a simple geometrystatic GeometrytoSimpleGeometry(GeoJsonObject geoJson)Convert the GeoJSON object to a simple geometrystatic StringtoStringValue(Object object)Convert the object to a string valuestatic StringtoStringValue(Geometry simpleGeometry)Convert the simple geometry to a string valuestatic <T> TtoTypedObject(Class<T> type, com.fasterxml.jackson.databind.JsonNode tree)Convert the JSON tree to a typed objectstatic <T> TtoTypedObject(Class<T> type, Object value)Convert the object value to a typed objectstatic <T> TtoTypedObject(Class<T> type, String content)Convert the string content to a typed object
-
-
-
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 typecontent- 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 typevalue- 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 typetree- tree node- Returns:
- typed object
-
-