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