Package org.vast.ogc.gml
Class GeoJsonBindings
java.lang.Object
org.vast.ogc.gml.GeoJsonBindings
 GeoJSON bindings using Gson JsonWriter/JsonReader.
 This class is NOT threadsafe.
 
- 
Field Summary
Fields - 
Constructor Summary
ConstructorsConstructorDescriptionGeoJsonBindings(boolean useJTS) GeoJsonBindings(boolean useJTS, boolean enforceTypeFirst) GeoJsonBindings(GMLFactory factory)  - 
Method Summary
Modifier and TypeMethodDescriptionprotected com.google.gson.stream.JsonReaderbeginObjectWithType(com.google.gson.stream.JsonReader reader) protected AbstractFeaturecreateFeatureObject(String type) protected StringdecodeFeatureID(String idVal, AbstractFeature bean) protected StringencodeFeatureID(IFeature bean) protected org.vast.ogc.gml.GeoJsonBindings.CrsTypegetCrsType(AbstractGeometry bean) protected GeoPoseJsonBindingsprotected StringgetTypeProp(IFeature bean) protected booleanprotected booleanreadCommonFeatureProperty(com.google.gson.stream.JsonReader reader, AbstractFeature f, String name) intreadCoordinates(com.google.gson.stream.JsonReader reader, gnu.trove.list.array.TDoubleArrayList coords, int prevNumDims) voidreadCoordinates(com.google.gson.stream.JsonReader reader, LineString geom) voidreadCoordinates(com.google.gson.stream.JsonReader reader, Point geom) voidreadCoordinates(com.google.gson.stream.JsonReader reader, Polygon geom) protected voidreadCustomFeatureProperty(com.google.gson.stream.JsonReader reader, GenericFeatureImpl f, String name) protected voidreadCustomObjectProperty(com.google.gson.stream.JsonReader reader, GenericFeatureImpl f, String name) voidreadCustomProperties(com.google.gson.stream.JsonReader reader, Map<QName, Object> map) readEnvelope(com.google.gson.stream.JsonReader reader) readFeature(com.google.gson.stream.JsonReader reader) readGeometry(com.google.gson.stream.JsonReader reader) readGeometry(com.google.gson.stream.JsonReader reader, String type) intreadLinearRing(com.google.gson.stream.JsonReader reader, Polygon geom, boolean interior, int prevNumDims) protected booleanreadStandardGeoJsonProperty(com.google.gson.stream.JsonReader reader, AbstractFeature f, String name) protected StringreadTimeBound(com.google.gson.stream.JsonReader reader, boolean isBegin) readTimeExtent(com.google.gson.stream.JsonReader reader) protected voidwriteCommonFeatureProperties(com.google.gson.stream.JsonWriter writer, IFeature bean) org.vast.ogc.gml.GeoJsonBindings.CrsTypewriteCommonGeometryProperties(com.google.gson.stream.JsonWriter writer, AbstractGeometry bean) voidwriteCoordinates(com.google.gson.stream.JsonWriter writer, double[] coords, int index, int dims, org.vast.ogc.gml.GeoJsonBindings.CrsType crsType) protected voidwriteCustomFeatureProperties(com.google.gson.stream.JsonWriter writer, IFeature bean) protected voidwriteCustomJsonProperties(com.google.gson.stream.JsonWriter writer, IFeature bean) protected voidwriteDateTimeValue(com.google.gson.stream.JsonWriter writer, Instant dateTime) voidwriteEnvelope(com.google.gson.stream.JsonWriter writer, Envelope bean) voidwriteFeature(com.google.gson.stream.JsonWriter writer, IFeature bean) voidwriteGeometry(com.google.gson.stream.JsonWriter writer, AbstractGeometry bean) protected booleanwriteInline(com.google.gson.stream.JsonWriter writer, boolean inline) voidwriteLinearRing(com.google.gson.stream.JsonWriter writer, LinearRing bean, int dims, org.vast.ogc.gml.GeoJsonBindings.CrsType crsType) voidwriteLineString(com.google.gson.stream.JsonWriter writer, LineString bean) voidwriteLink(com.google.gson.stream.JsonWriter writer, IXlinkReference<?> link) voidwritePoint(com.google.gson.stream.JsonWriter writer, Point bean) voidwritePolygon(com.google.gson.stream.JsonWriter writer, Polygon bean) protected voidwriteStandardGeoJsonProperties(com.google.gson.stream.JsonWriter writer, IFeature bean) voidwriteTimeExtent(com.google.gson.stream.JsonWriter writer, TimeExtent bean)  
- 
Field Details
- 
MIME_TYPE
- See Also:
 
 - 
NAN
- See Also:
 
 - 
PLUS_INFINITY
- See Also:
 
 - 
MINUS_INFINITY
- See Also:
 
 - 
ERROR_UNSUPPORTED_TYPE
- See Also:
 
 - 
ERROR_INVALID_COORDINATES
- See Also:
 
 - 
ERROR_INVALID_TIMERANGE
- See Also:
 
 
 - 
 - 
Constructor Details
- 
GeoJsonBindings
public GeoJsonBindings() - 
GeoJsonBindings
public GeoJsonBindings(boolean useJTS)  - 
GeoJsonBindings
public GeoJsonBindings(boolean useJTS, boolean enforceTypeFirst)  - 
GeoJsonBindings
 
 - 
 - 
Method Details
- 
writeFeature
public void writeFeature(com.google.gson.stream.JsonWriter writer, IFeature bean) throws IOException - Throws:
 IOException
 - 
writeStandardGeoJsonProperties
protected void writeStandardGeoJsonProperties(com.google.gson.stream.JsonWriter writer, IFeature bean) throws IOException - Throws:
 IOException
 - 
writeCommonFeatureProperties
protected void writeCommonFeatureProperties(com.google.gson.stream.JsonWriter writer, IFeature bean) throws IOException - Throws:
 IOException
 - 
getTypeProp
 - 
writeCustomFeatureProperties
protected void writeCustomFeatureProperties(com.google.gson.stream.JsonWriter writer, IFeature bean) throws IOException - Throws:
 IOException
 - 
getGeoPoseBindings
 - 
writeCustomJsonProperties
protected void writeCustomJsonProperties(com.google.gson.stream.JsonWriter writer, IFeature bean) throws IOException - Throws:
 IOException
 - 
hasNonGeoJsonProperties
 - 
encodeFeatureID
- Throws:
 IOException
 - 
writeLink
public void writeLink(com.google.gson.stream.JsonWriter writer, IXlinkReference<?> link) throws IOException - Throws:
 IOException
 - 
writeEnvelope
public void writeEnvelope(com.google.gson.stream.JsonWriter writer, Envelope bean) throws IOException - Throws:
 IOException
 - 
writeGeometry
public void writeGeometry(com.google.gson.stream.JsonWriter writer, AbstractGeometry bean) throws IOException - Throws:
 IOException
 - 
getCrsType
 - 
writeCommonGeometryProperties
public org.vast.ogc.gml.GeoJsonBindings.CrsType writeCommonGeometryProperties(com.google.gson.stream.JsonWriter writer, AbstractGeometry bean) throws IOException - Throws:
 IOException
 - 
writePoint
- Throws:
 IOException
 - 
writeLineString
public void writeLineString(com.google.gson.stream.JsonWriter writer, LineString bean) throws IOException - Throws:
 IOException
 - 
writePolygon
- Throws:
 IOException
 - 
writeLinearRing
public void writeLinearRing(com.google.gson.stream.JsonWriter writer, LinearRing bean, int dims, org.vast.ogc.gml.GeoJsonBindings.CrsType crsType) throws IOException - Throws:
 IOException
 - 
writeCoordinates
public void writeCoordinates(com.google.gson.stream.JsonWriter writer, double[] coords, int index, int dims, org.vast.ogc.gml.GeoJsonBindings.CrsType crsType) throws IOException - Throws:
 IOException
 - 
writeTimeExtent
public void writeTimeExtent(com.google.gson.stream.JsonWriter writer, TimeExtent bean) throws IOException - Throws:
 IOException
 - 
writeDateTimeValue
protected void writeDateTimeValue(com.google.gson.stream.JsonWriter writer, Instant dateTime) throws IOException - Throws:
 IOException
 - 
writeInline
protected boolean writeInline(com.google.gson.stream.JsonWriter writer, boolean inline)  - 
readFeature
- Throws:
 IOException
 - 
createFeatureObject
 - 
beginObjectWithType
protected com.google.gson.stream.JsonReader beginObjectWithType(com.google.gson.stream.JsonReader reader) throws IOException - Throws:
 IOException
 - 
readStandardGeoJsonProperty
protected boolean readStandardGeoJsonProperty(com.google.gson.stream.JsonReader reader, AbstractFeature f, String name) throws IOException - Throws:
 IOException
 - 
readCommonFeatureProperty
protected boolean readCommonFeatureProperty(com.google.gson.stream.JsonReader reader, AbstractFeature f, String name) throws IOException - Throws:
 IOException
 - 
readCustomFeatureProperty
protected void readCustomFeatureProperty(com.google.gson.stream.JsonReader reader, GenericFeatureImpl f, String name) throws IOException - Throws:
 IOException
 - 
readCustomObjectProperty
protected void readCustomObjectProperty(com.google.gson.stream.JsonReader reader, GenericFeatureImpl f, String name) throws IOException - Throws:
 IOException
 - 
decodeFeatureID
- Throws:
 IOException
 - 
readCustomProperties
public void readCustomProperties(com.google.gson.stream.JsonReader reader, Map<QName, Object> map) throws IOException- Throws:
 IOException
 - 
readEnvelope
- Throws:
 IOException
 - 
readGeometry
- Throws:
 IOException
 - 
readGeometry
public AbstractGeometry readGeometry(com.google.gson.stream.JsonReader reader, String type) throws IOException - Throws:
 IOException
 - 
readCoordinates
public void readCoordinates(com.google.gson.stream.JsonReader reader, Point geom) throws IOException - Throws:
 IOException
 - 
readCoordinates
public void readCoordinates(com.google.gson.stream.JsonReader reader, LineString geom) throws IOException - Throws:
 IOException
 - 
readCoordinates
public void readCoordinates(com.google.gson.stream.JsonReader reader, Polygon geom) throws IOException - Throws:
 IOException
 - 
readLinearRing
public int readLinearRing(com.google.gson.stream.JsonReader reader, Polygon geom, boolean interior, int prevNumDims) throws IOException - Throws:
 IOException
 - 
readCoordinates
public int readCoordinates(com.google.gson.stream.JsonReader reader, gnu.trove.list.array.TDoubleArrayList coords, int prevNumDims) throws IOException - Throws:
 IOException
 - 
readTimeExtent
- Throws:
 IOException
 - 
readTimeBound
protected String readTimeBound(com.google.gson.stream.JsonReader reader, boolean isBegin) throws IOException - Throws:
 IOException
 
 -