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 Summary
Fields Modifier and Type Field Description static AttributeTypeATTRIBUTETYPE_NULL
-
Constructor Summary
Constructors Constructor Description GeoJSONFeatureCollectionWrapper()create a new empty FeatureCollection wrapperGeoJSONFeatureCollectionWrapper(FeatureCollection fc)create a wrapper for an existing FeatureCollection
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description voidadd(Map featureMap)add a Feature defined by given JSON-simple map to the collectionFeatureCollectiongetFeatureCollection()we need to fixup the feature schema before the collection is ready to be usedintsize()static AttributeTypetoAttributeType(Object value)voidwriteJSONString(Writer out)voidwriteJSONString(Writer out, TaskMonitor monitor)
-
-
-
Field Detail
-
ATTRIBUTETYPE_NULL
public static final AttributeType ATTRIBUTETYPE_NULL
-
-
Constructor Detail
-
GeoJSONFeatureCollectionWrapper
public GeoJSONFeatureCollectionWrapper()
create a new empty FeatureCollection wrapper
-
GeoJSONFeatureCollectionWrapper
public GeoJSONFeatureCollectionWrapper(FeatureCollection fc)
create a wrapper for an existing FeatureCollection
-
-
Method Detail
-
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:
writeJSONStringin interfaceorg.json.simple.JSONStreamAware- Throws:
IOException
-
writeJSONString
public void writeJSONString(Writer out, TaskMonitor monitor) throws IOException
- Throws:
IOException
-
-