Package org.geotools.gml.producer
Class GeometryTransformer.GeometryTranslator
Object
TransformerBase.TranslatorSupport
GeometryTranslator
- All Implemented Interfaces:
Translator
- Enclosing class:
- GeometryTransformer
public static class GeometryTransformer.GeometryTranslator
extends TransformerBase.TranslatorSupport
-
Field Summary
FieldsFields inherited from class TransformerBase.TranslatorSupport
contentHandler, nsSupport, NULL_ATTS, running, schemaLocation
-
Constructor Summary
ConstructorsConstructorDescriptionGeometryTranslator
(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. -
Method Summary
Modifier and TypeMethodDescriptionprotected String
boxName()
Method to be subclassed in order to allow for gml3 encoding of envelopes.void
Encode the object.void
void
void
void
Encodes the given geometry with no srsName attribute and forcing 2Dvoid
Encodes the geometry in plain 2D using the given srsName attribute valuevoid
Encodes the given geometry with the provided srsName attribute and for the specified dimensionsprotected void
Method to be subclasses in order to allow for gml3 encoding for null enevelope.boolean
int
boolean
boolean
Methods inherited from class TransformerBase.TranslatorSupport
abort, addNamespaceDeclarations, cdata, chars, comment, commit, createAttributes, element, element, elementSafe, end, getDefaultNamespace, getDefaultPrefix, getNamespaceSupport, getSchemaLocationSupport, mark, reset, start, start
-
Field Details
-
coordWriter
-
-
Constructor Details
-
GeometryTranslator
-
GeometryTranslator
-
GeometryTranslator
-
GeometryTranslator
-
GeometryTranslator
-
GeometryTranslator
public GeometryTranslator(ContentHandler handler, int numDecimals, boolean padWithZeros, boolean forceDecimalEncoding) -
GeometryTranslator
public GeometryTranslator(ContentHandler handler, String prefix, String nsUri, int numDecimals, boolean isDummyZEnabled) -
GeometryTranslator
public GeometryTranslator(ContentHandler handler, String prefix, String nsUri, int numDecimals, boolean padWithZeros, boolean forceDecimalEncoding) -
GeometryTranslator
public GeometryTranslator(ContentHandler handler, int numDecimals, boolean padWithZeros, boolean forceDecimalEncoding, boolean isDummyZEnabled) -
GeometryTranslator
public GeometryTranslator(ContentHandler handler, String prefix, String nsUri, int numDecimals, boolean padWithZeros, boolean forceDecimalEncoding, boolean isDummyZEnabled) -
GeometryTranslator
public 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.- Parameters:
dimension
- If this value is 3; the coordinate.z will be used rather than dummyZ since 2.4.1
-
-
Method Details
-
isDummyZEnabled
public boolean isDummyZEnabled() -
getNumDecimals
public int getNumDecimals() -
getPadWithZeros
public boolean getPadWithZeros() -
getForceDecimalEncoding
public boolean getForceDecimalEncoding() -
encode
- Throws:
IllegalArgumentException
-
encode
Description copied from interface:Translator
Encode the object.- Parameters:
o
- The Object to encode.- Throws:
IllegalArgumentException
- if the Object is not encodeable.
-
encode
-
encode
-
encodeNullBounds
protected void encodeNullBounds()Method to be subclasses in order to allow for gml3 encoding for null enevelope. -
boxName
Method to be subclassed in order to allow for gml3 encoding of envelopes.- Returns:
- "Box"
-
encode
Encodes the given geometry with no srsName attribute and forcing 2D -
encode
Encodes the geometry in plain 2D using the given srsName attribute value- See Also:
-
encode
Encodes the given geometry with the provided srsName attribute and for the specified dimensions- Parameters:
geometry
- non null geometry to encodesrsName
- srsName attribute for the geometry, ornull
dimensions
- shall laid between 1, 2, or 3. Number of coordinate dimensions to force. TODO: dimensions is not being taken into account currently. Jody?
-