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)
locator - ContentHandler.setDocumentLocator(org.xml.sax.Locator)public void startDocument()
throws SAXException
SAXExceptionContentHandler.startDocument()public void endDocument()
throws SAXException
SAXExceptionContentHandler.endDocument()public void startPrefixMapping(String prefix, String uri) throws SAXException
prefix - uri - SAXExceptionContentHandler.startPrefixMapping(java.lang.String, java.lang.String)public void endPrefixMapping(String prefix) throws SAXException
prefix - SAXExceptionContentHandler.endPrefixMapping(java.lang.String)public void startElement(QualifiedName qn, Attributes atts) throws SAXException
uri - localName - qName - atts - SAXExceptionContentHandler.startElement(java.lang.String, java.lang.String,
java.lang.String, org.xml.sax.Attributes)public void endElement(QualifiedName qn) throws SAXException
uri - localName - qName - SAXExceptionContentHandler.endElement(java.lang.String, java.lang.String,
java.lang.String)public void coordinates(CoordinateSequence cs)
throws SAXException
cs - SAXExceptionpublic void position(double x,
double y,
double z)
throws SAXException
x - y - SAXExceptionpublic void position(CoordinateSequence coordinates)
throws SAXException
coordinates - the coordinates sequenceSAXExceptionpublic void ordinate(double x)
throws SAXException
x - SAXExceptionpublic void posList(CoordinateSequence coordinateSequence)
throws SAXException
coordinateSequence - SAXExceptionCopyright © 1996–2019 Geotools. All rights reserved.