Class GeoJsonMetacardTransformer
java.lang.Object
ddf.catalog.transformer.metacard.geojson.GeoJsonMetacardTransformer
- All Implemented Interfaces:
ddf.catalog.transform.MetacardTransformer
public class GeoJsonMetacardTransformer
extends Object
implements ddf.catalog.transform.MetacardTransformer
Implements the
MetacardTransformer interface to transform a single Metacard
instance to GeoJSON. This class places what is returned by Metacard.getLocation() in the
geometry JSON object in the GeoJSON output. The rest of the attributes of the Metacard are placed
in the properties object in the JSON. See geojson.org for the GeoJSON specification.- Author:
- Ashraf Barakat
- See Also:
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic org.json.simple.JSONObjectconvertToJSON(ddf.catalog.data.Metacard metacard) toString()ddf.catalog.data.BinaryContenttransform(ddf.catalog.data.Metacard metacard, Map<String, Serializable> arguments)
-
Field Details
-
ISO_8601_DATE_FORMAT
- See Also:
-
ID
- See Also:
-
DEFAULT_MIME_TYPE
protected static final javax.activation.MimeType DEFAULT_MIME_TYPE
-
-
Constructor Details
-
GeoJsonMetacardTransformer
public GeoJsonMetacardTransformer()
-
-
Method Details
-
convertToJSON
public static org.json.simple.JSONObject convertToJSON(ddf.catalog.data.Metacard metacard) throws ddf.catalog.transform.CatalogTransformerException - Throws:
ddf.catalog.transform.CatalogTransformerException
-
transform
public ddf.catalog.data.BinaryContent transform(ddf.catalog.data.Metacard metacard, Map<String, Serializable> arguments) throws ddf.catalog.transform.CatalogTransformerException- Specified by:
transformin interfaceddf.catalog.transform.MetacardTransformer- Throws:
ddf.catalog.transform.CatalogTransformerException
-
toString
-