public class GMLWriter extends Object
| Constructor and Description |
|---|
GMLWriter(ContentHandler delegate,
NamespaceSupport namespaces,
int numDecimals,
boolean forceDecimal,
boolean padWithZeros,
String gmlPrefix)
Create a new content handler
|
GMLWriter(ContentHandler delegate,
NamespaceSupport namespaces,
int numDecimals,
boolean forceDecimal,
boolean padWithZeros,
String gmlPrefix,
boolean encodeMeasures)
Create a new content handler
|
GMLWriter(ContentHandler delegate,
NamespaceSupport namespaces,
int numDecimals,
boolean forceDecimal,
String gmlPrefix)
Create a new content handler
|
| Modifier and Type | Method and Description |
|---|---|
void |
coordinates(CoordinateSequence cs)
Writes a GML2 coordinates element
|
void |
endDocument() |
void |
endElement(QualifiedName qn) |
void |
endPrefixMapping(String prefix) |
void |
ordinate(double x)
Writes a single ordinate, without wrapping it inside any element
|
void |
position(CoordinateSequence coordinates)
Encodes the provided coordinates sequence, if encoding of measures is enabled this method
will encode all the available ordinates.
|
void |
position(double x,
double y,
double z)
Writes a single x/y position, without wrapping it in any element
|
void |
posList(CoordinateSequence coordinateSequence)
Write a GML3 posList
|
void |
setDocumentLocator(Locator locator) |
void |
startDocument() |
void |
startElement(QualifiedName qn,
Attributes atts) |
void |
startPrefixMapping(String prefix,
String uri) |
public GMLWriter(ContentHandler delegate, NamespaceSupport namespaces, int numDecimals, boolean forceDecimal, String gmlPrefix)
delegate - The actual XML writernamespaces - The namespaces known to the EncodernumDecimals - How many decimals to preserve when writing ordinatesforceDecimal - If xs:decimal compliant encoding should be used, or notgmlPrefix - The GML namespace prefixpublic GMLWriter(ContentHandler delegate, NamespaceSupport namespaces, int numDecimals, boolean forceDecimal, boolean padWithZeros, String gmlPrefix)
delegate - The actual XML writernamespaces - The namespaces known to the EncodernumDecimals - How many decimals to preserve when writing ordinatesforceDecimal - If xs:decimal compliant encoding should be used, or notpadWithZeros - If apply zero paddinggmlPrefix - The GML namespace prefixpublic GMLWriter(ContentHandler delegate, NamespaceSupport namespaces, int numDecimals, boolean forceDecimal, boolean padWithZeros, String gmlPrefix, boolean encodeMeasures)
delegate - The actual XML writernamespaces - The namespaces known to the EncodernumDecimals - How many decimals to preserve when writing ordinatesforceDecimal - If xs:decimal compliant encoding should be used, or notgmlPrefix - The GML namespace prefixencodeMeasures - TRUE if coordinates measures should be includedpublic void setDocumentLocator(Locator locator)
public void startDocument()
throws SAXException
SAXExceptionContentHandler.startDocument()public void endDocument()
throws SAXException
SAXExceptionContentHandler.endDocument()public void startPrefixMapping(String prefix, String uri) throws SAXException
public void endPrefixMapping(String prefix) throws SAXException
SAXExceptionContentHandler.endPrefixMapping(java.lang.String)public void startElement(QualifiedName qn, Attributes atts) throws SAXException
public void endElement(QualifiedName qn) throws SAXException
public void coordinates(CoordinateSequence cs)
throws SAXException
SAXExceptionpublic void position(double x,
double y,
double z)
throws SAXException
SAXExceptionpublic void position(CoordinateSequence coordinates)
throws SAXException
coordinates - the coordinates sequenceSAXExceptionpublic void ordinate(double x)
throws SAXException
SAXExceptionpublic void posList(CoordinateSequence coordinateSequence)
throws SAXException
SAXExceptionCopyright © 1996–2021 Geotools. All rights reserved.