Package org.geotools.gml.producer
Class CoordinateWriter
Object
CoordinateWriter
Handles the writing of coordinates for GML.
- Author:
- Chris Holmes, Ian Schneider
-
Constructor Summary
ConstructorsConstructorDescriptionCoordinateWriter
(int numDecimals) CoordinateWriter
(int numDecimals, boolean isDummyZEnabled) CoordinateWriter
(int numDecimals, boolean padWithZeros, boolean forceDecimalEncoding) CoordinateWriter
(int numDecimals, boolean padWithZeros, boolean forceDecimalEncoding, boolean isDummyZEnabled) CoordinateWriter
(int numDecimals, boolean padWithZeros, boolean forceDecimalEncoding, boolean useDummyZ, int dimension) CoordinateWriter
(int numDecimals, boolean padWithZeros, boolean forceDecimalEncoding, String tupleDelim, String coordDelim) CoordinateWriter
(int numDecimals, boolean padWithZeros, boolean forceDecimalEncoding, String tupleDelim, String coordDelim, boolean useDummyZ) CoordinateWriter
(int numDecimals, boolean padWithZeros, boolean forceDecimalEncoding, String tupleDelim, String coordDelim, boolean useDummyZ, double zValue) CoordinateWriter
(int numDecimals, boolean padWithZeros, boolean forceDecimalEncoding, String tupleDelim, String coordDelim, boolean useZ, double z, int dimension) Create a CoordinateWriter for outputting GML coordinates.CoordinateWriter
(int numDecimals, boolean useDummyZ, int dimension) CoordinateWriter
(int numDecimals, String tupleDelim, String coordDelim) CoordinateWriter
(int numDecimals, String tupleDelim, String coordDelim, boolean useDummyZ) CoordinateWriter
(int numDecimals, String tupleDelim, String coordDelim, boolean useDummyZ, double zValue) CoordinateWriter
(int numDecimals, String tupleDelim, String coordDelim, boolean useZ, double z, int dimension) -
Method Summary
Modifier and TypeMethodDescriptionboolean
int
boolean
boolean
void
setNamespaceAware
(boolean namespaceAware) void
setNamespaceUri
(String namespaceUri) void
void
writeCoordinates
(CoordinateSequence c, ContentHandler output) Write the provided list of coordinates out.
-
Constructor Details
-
CoordinateWriter
public CoordinateWriter() -
CoordinateWriter
public CoordinateWriter(int numDecimals) -
CoordinateWriter
public CoordinateWriter(int numDecimals, boolean isDummyZEnabled) -
CoordinateWriter
-
CoordinateWriter
public CoordinateWriter(int numDecimals, boolean padWithZeros, boolean forceDecimalEncoding, boolean isDummyZEnabled) -
CoordinateWriter
-
CoordinateWriter
public CoordinateWriter(int numDecimals, boolean padWithZeros, boolean forceDecimalEncoding) -
CoordinateWriter
-
CoordinateWriter
public CoordinateWriter(int numDecimals, boolean useDummyZ, int dimension) -
CoordinateWriter
-
CoordinateWriter
-
CoordinateWriter
-
CoordinateWriter
-
CoordinateWriter
public CoordinateWriter(int numDecimals, boolean padWithZeros, boolean forceDecimalEncoding, boolean useDummyZ, int dimension) -
CoordinateWriter
public CoordinateWriter(int numDecimals, boolean padWithZeros, boolean forceDecimalEncoding, String tupleDelim, String coordDelim, boolean useZ, double z, int dimension) Create a CoordinateWriter for outputting GML coordinates.The use of dimension, z and useZ is based on your needs:
- dimension: is from your CoordinateReferenceSystem; it is the number of axis used by the coordinate
- useZ: is used to force the use of 3 dimensions (if needed the z value below will be used for 2D data)
- z: the dummy z value to use if the coordinate does not have one
- Parameters:
numDecimals
- Number of decimals to use (a speed vs accuracy trade off)tupleDelim
- delimiter to use between ordinates (usually ',')coordDelim
- delimiter to use between coordinates (usually ' ')useZ
- true if the provided zValue should be forcedz
- Dummy z value to use if neededdimension
- Dimension of coordinates (usually 2 or 3)
-
-
Method Details
-
getNumDecimals
public int getNumDecimals() -
getPadWithZeros
public boolean getPadWithZeros() -
getForceDecimalEncoding
public boolean getForceDecimalEncoding() -
isDummyZEnabled
public boolean isDummyZEnabled() -
setNamespaceAware
public void setNamespaceAware(boolean namespaceAware) -
setPrefix
-
setNamespaceUri
-
writeCoordinates
Write the provided list of coordinates out.There are a range of constants that control exactly what is written:
- useDummyZ: if true dummyZ will be added to each coordiante
- namespaceAware: is true the prefix and namespaceUri will be used
- Throws:
SAXException
-