public static class GeometryTransformer.GeometryTranslator extends TransformerBase.TranslatorSupport
Modifier and Type | Field and Description |
---|---|
protected CoordinateWriter |
coordWriter |
contentHandler, nsSupport, NULL_ATTS, running, schemaLocation
Constructor and Description |
---|
GeometryTranslator(ContentHandler handler) |
GeometryTranslator(ContentHandler handler,
int numDecimals) |
GeometryTranslator(ContentHandler handler,
int numDecimals,
boolean isDummyZEnabled) |
GeometryTranslator(ContentHandler handler,
int numDecimals,
boolean padWithZeros,
boolean forceDecimalEncoding) |
GeometryTranslator(ContentHandler handler,
int numDecimals,
boolean padWithZeros,
boolean forceDecimalEncoding,
boolean isDummyZEnabled) |
GeometryTranslator(ContentHandler handler,
String prefix,
String nsUri) |
GeometryTranslator(ContentHandler handler,
String prefix,
String nsUri,
int numDecimals) |
GeometryTranslator(ContentHandler handler,
String prefix,
String nsUri,
int numDecimals,
boolean isDummyZEnabled) |
GeometryTranslator(ContentHandler handler,
String prefix,
String nsUri,
int numDecimals,
boolean padWithZeros,
boolean forceDecimalEncoding) |
GeometryTranslator(ContentHandler handler,
String prefix,
String nsUri,
int numDecimals,
boolean padWithZeros,
boolean forceDecimalEncoding,
boolean isDummyZEnabled) |
GeometryTranslator(ContentHandler handler,
String prefix,
String nsUri,
int numDecimals,
boolean padWithZeros,
boolean forceDecimalEncoding,
boolean isDummyZEnabled,
int dimension)
Constructor for GeometryTranslator allowing the specification of the number of valid
dimension represented in the Coordinates.
|
Modifier and Type | Method and Description |
---|---|
protected String |
boxName()
Method to be subclassed in order to allow for gml3 encoding of envelopes.
|
void |
encode(Envelope bounds) |
void |
encode(Envelope bounds,
String srsName) |
void |
encode(Geometry geometry)
Encodes the given geometry with no srsName attribute and forcing 2D
|
void |
encode(Geometry geometry,
String srsName)
Encodes the geometry in plain 2D using the given srsName attribute value
|
void |
encode(Geometry geometry,
String srsName,
int dimensions)
Encodes the given geometry with the provided srsName attribute and for the specified
dimensions
|
void |
encode(Object o)
Encode the object.
|
void |
encode(Object o,
String srsName) |
protected void |
encodeNullBounds()
Method to be subclasses in order to allow for gml3 encoding for null enevelope.
|
boolean |
getForceDecimalEncoding() |
int |
getNumDecimals() |
boolean |
getPadWithZeros() |
boolean |
isDummyZEnabled() |
abort, addNamespaceDeclarations, cdata, chars, comment, commit, createAttributes, element, element, elementSafe, end, getDefaultNamespace, getDefaultPrefix, getNamespaceSupport, getSchemaLocationSupport, mark, reset, start, start
protected CoordinateWriter coordWriter
public GeometryTranslator(ContentHandler handler)
public GeometryTranslator(ContentHandler handler, String prefix, String nsUri)
public GeometryTranslator(ContentHandler handler, int numDecimals)
public GeometryTranslator(ContentHandler handler, String prefix, String nsUri, int numDecimals)
public GeometryTranslator(ContentHandler handler, int numDecimals, boolean isDummyZEnabled)
public GeometryTranslator(ContentHandler handler, int numDecimals, boolean padWithZeros, boolean forceDecimalEncoding)
public GeometryTranslator(ContentHandler handler, String prefix, String nsUri, int numDecimals, boolean isDummyZEnabled)
public GeometryTranslator(ContentHandler handler, String prefix, String nsUri, int numDecimals, boolean padWithZeros, boolean forceDecimalEncoding)
public GeometryTranslator(ContentHandler handler, int numDecimals, boolean padWithZeros, boolean forceDecimalEncoding, boolean isDummyZEnabled)
public GeometryTranslator(ContentHandler handler, String prefix, String nsUri, int numDecimals, boolean padWithZeros, boolean forceDecimalEncoding, boolean isDummyZEnabled)
public GeometryTranslator(ContentHandler handler, String prefix, String nsUri, int numDecimals, boolean padWithZeros, boolean forceDecimalEncoding, boolean isDummyZEnabled, int dimension)
handler
- prefix
- nsUri
- numDecimals
- isDummyZEnabled
- dimension
- If this value is 3; the coordinate.z will be used rather than dummyZ
since 2.4.1public boolean isDummyZEnabled()
public int getNumDecimals()
public boolean getPadWithZeros()
public boolean getForceDecimalEncoding()
public void encode(Object o, String srsName) throws IllegalArgumentException
IllegalArgumentException
public void encode(Object o) throws IllegalArgumentException
Translator
o
- The Object to encode.IllegalArgumentException
- if the Object is not encodeable.public void encode(Envelope bounds)
public void encode(Envelope bounds, String srsName)
protected void encodeNullBounds()
protected String boxName()
public void encode(Geometry geometry)
public void encode(Geometry geometry, String srsName)
encode(Geometry, String, int)
public void encode(Geometry geometry, String srsName, int dimensions)
geometry
- non null geometry to encodesrsName
- srsName attribute for the geometry, or null
dimensions
- shall laid between 1, 2, or 3. Number of coordinate dimensions to
force. TODO: dimensions is not being taken into account currently. Jody?Copyright © 1996–2019 Geotools. All rights reserved.