public class GmlHandler extends AbstractSaxEventHandler
GMLHandler
. Uses WKTWriter
to write the Geometries to WKT. Note: ONLY CAN PARSE GML2
points. Will throw hard-to-debug Null Pointer Exceptions if used with GML3 or other GML2
geometries. Constructor and Description |
---|
GmlHandler(com.vividsolutions.jts.io.gml2.GMLHandler gmlHandler,
Gml3ToWkt gml3Converter) |
Modifier and Type | Method and Description |
---|---|
void |
characters(char[] ch,
int start,
int length)
Takes in a sax event from
SaxEventHandlerDelegate , and if it is a gml:Point
or a sub-element of a gml:Point, it will * hand the event off to the GML handler for further
parsing. |
void |
endElement(String namespaceURI,
String localName,
String qName)
Takes in a sax event from
SaxEventHandlerDelegate , and if it is a gml:Point
or a sub-element of a gml:Point, it will * hand the event off to the GML handler for further
parsing. |
List<Attribute> |
getAttributes() |
Set<AttributeDescriptor> |
getSupportedAttributeDescriptors()
Get all the possible attribute types that can be returned by this factory's handler
|
void |
startElement(String uri,
String localName,
String qName,
Attributes attributes)
Takes in a sax event from
SaxEventHandlerDelegate , and if it is a gml:Point
or a sub-element of a gml:Point, it will hand the event off to the GML handler for further
parsing. |
void |
startPrefixMapping(String prefix,
String uri) |
endDocument, endPrefixMapping, ignorableWhitespace, processingInstruction, setDocumentLocator, skippedEntity, startDocument
public GmlHandler(com.vividsolutions.jts.io.gml2.GMLHandler gmlHandler, Gml3ToWkt gml3Converter)
public Set<AttributeDescriptor> getSupportedAttributeDescriptors()
SaxEventHandler
public void startPrefixMapping(String prefix, String uri) throws SAXException
startPrefixMapping
in interface ContentHandler
startPrefixMapping
in class AbstractSaxEventHandler
SAXException
public void startElement(String uri, String localName, String qName, Attributes attributes)
SaxEventHandlerDelegate
, and if it is a gml:Point
or a sub-element of a gml:Point, it will hand the event off to the GML handler for further
parsing.uri
- the URI that is passed in by SaxEventHandlerDelegate
localName
- the localName that is passed in by SaxEventHandlerDelegate
qName
- the qName that is passed in by SaxEventHandlerDelegate
attributes
- the attributes that are passed in by SaxEventHandlerDelegate
public void endElement(String namespaceURI, String localName, String qName)
SaxEventHandlerDelegate
, and if it is a gml:Point
or a sub-element of a gml:Point, it will * hand the event off to the GML handler for further
parsing. If it is a gml:Point, the point is stored as a WKT in the attributes listnamespaceURI
- the namespaceURI that is passed in by SaxEventHandlerDelegate
localName
- the localName that is passed in by SaxEventHandlerDelegate
qName
- the qName that is passed in by SaxEventHandlerDelegate
public void characters(char[] ch, int start, int length)
SaxEventHandlerDelegate
, and if it is a gml:Point
or a sub-element of a gml:Point, it will * hand the event off to the GML handler for further
parsing.ch
- the ch that is passed in by SaxEventHandlerDelegate
start
- the start that is passed in by SaxEventHandlerDelegate
length
- the length that is passed in by SaxEventHandlerDelegate
This work is licensed under a Creative Commons Attribution 4.0 International License.