public class GpxReader extends java.lang.Object implements GpxConstants, IGpxReader
GpxData.recalculateBounds()
.Modifier and Type | Class and Description |
---|---|
private class |
GpxReader.Parser |
private static class |
GpxReader.State |
GpxConstants.ColorFormat
Modifier and Type | Field and Description |
---|---|
private GpxData |
gpxData
The resulting gpx data
|
private org.xml.sax.InputSource |
inputSource |
private java.lang.String |
version |
EXTENSION_ABBREVIATIONS, FIX_VALUES, GARMIN_COLORS, GPX_CMT, GPX_DESC, GPX_NAME, GPX_PREFIX, GPX_SRC, META_AUTHOR_EMAIL, META_AUTHOR_LINK, META_AUTHOR_NAME, META_BOUNDS, META_COPYRIGHT_AUTHOR, META_COPYRIGHT_LICENSE, META_COPYRIGHT_YEAR, META_DESC, META_KEYWORDS, META_LINKS, META_NAME, META_PREFIX, META_TIME, PT_AGEOFDGPSDATA, PT_DGPSID, PT_ELE, PT_FIX, PT_GEOIDHEIGHT, PT_HDOP, PT_MAGVAR, PT_PDOP, PT_SAT, PT_SYM, PT_TIME, PT_TYPE, PT_VDOP, RTE_TRK_KEYS, RTKLIB_AGE, RTKLIB_Q, RTKLIB_RATIO, RTKLIB_SDE, RTKLIB_SDEU, RTKLIB_SDN, RTKLIB_SDNE, RTKLIB_SDU, RTKLIB_SDUN, WPT_KEYS, XML_URI_EXTENSIONS_DRAWING, XML_URI_EXTENSIONS_GARMIN, XML_URI_EXTENSIONS_JOSM, XML_URI_XSD, XML_XSD_EXTENSIONS_DRAWING, XML_XSD_EXTENSIONS_GARMIN, XML_XSD_EXTENSIONS_JOSM
Constructor and Description |
---|
GpxReader(java.io.InputStream source)
Constructs a new
GpxReader , which can later parse the input stream
and store the result in trackData and markerData |
Modifier and Type | Method and Description |
---|---|
GpxData |
getGpxData()
Replies the GPX data.
|
boolean |
parse(boolean tryToFinish)
Parse the GPX data.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getExtensionAbbreviations, getGarminColors
private java.lang.String version
private final org.xml.sax.InputSource inputSource
public GpxReader(java.io.InputStream source) throws java.io.IOException
GpxReader
, which can later parse the input stream
and store the result in trackData and markerDatasource
- the source input streamjava.io.IOException
- if an IO error occurs, e.g. the input stream is closed.public boolean parse(boolean tryToFinish) throws org.xml.sax.SAXException, java.io.IOException
parse
in interface IGpxReader
tryToFinish
- true, if the reader should return at least part of the GPX
data in case of an error.org.xml.sax.SAXException
- if any SAX parsing error occursjava.io.IOException
- if any I/O error occurspublic GpxData getGpxData()
IGpxReader
getGpxData
in interface IGpxReader