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:
  • MetacardTransformer
  • Metacard
  • Attribute
  • Field Details

  • 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:
      transform in interface ddf.catalog.transform.MetacardTransformer
      Throws:
      ddf.catalog.transform.CatalogTransformerException
    • toString

      public String toString()
      Overrides:
      toString in class Object