Class GeoJSONFeatureCollectionWrapper

java.lang.Object
com.vividsolutions.jump.io.geojson.GeoJSONFeatureCollectionWrapper
All Implemented Interfaces:
org.json.simple.JSONStreamAware

public class GeoJSONFeatureCollectionWrapper extends Object implements org.json.simple.JSONStreamAware
a wrapper for a feature collection to do funky geojson stuff to/with
  • Field Details

    • ATTRIBUTETYPE_NULL

      public static final AttributeType ATTRIBUTETYPE_NULL
  • Constructor Details

    • GeoJSONFeatureCollectionWrapper

      public GeoJSONFeatureCollectionWrapper()
      create a new empty FeatureCollection wrapper
    • GeoJSONFeatureCollectionWrapper

      public GeoJSONFeatureCollectionWrapper(FeatureCollection fc)
      create a wrapper for an existing FeatureCollection
  • Method Details

    • add

      public void add(Map featureMap) throws Exception
      add a Feature defined by given JSON-simple map to the collection
      Throws:
      Exception
    • toAttributeType

      public static AttributeType toAttributeType(Object value)
    • size

      public int size()
    • getFeatureCollection

      public FeatureCollection getFeatureCollection()
      we need to fixup the feature schema before the collection is ready to be used
      Returns:
      the FeatureCollection after the FeatureSchema has been fixed
    • writeJSONString

      public void writeJSONString(Writer out) throws IOException
      Specified by:
      writeJSONString in interface org.json.simple.JSONStreamAware
      Throws:
      IOException
    • writeJSONString

      public void writeJSONString(Writer out, TaskMonitor monitor) throws IOException
      Throws:
      IOException