org.openstreetmap.josm.io
Class GpxReader

java.lang.Object
  extended by org.openstreetmap.josm.io.GpxReader

public class GpxReader
extends java.lang.Object

Read a gpx file. Bounds are not read, as we caluclate them. @see GpxData.recalculateBounds() Both GPX version 1.0 and 1.1 are supported.


Nested Class Summary
private  class GpxReader.Parser
           
private static class GpxReader.State
           
 
Field Summary
 GpxData data
          The resulting gpx data
private  org.xml.sax.InputSource inputSource
           
private  java.lang.String version
           
 
Constructor Summary
GpxReader(java.io.InputStream source)
          Parse the input stream and store the result in trackData and markerData
 
Method Summary
 boolean parse(boolean tryToFinish)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

version

private java.lang.String version

data

public GpxData data
The resulting gpx data


inputSource

private org.xml.sax.InputSource inputSource
Constructor Detail

GpxReader

public GpxReader(java.io.InputStream source)
          throws java.io.IOException
Parse the input stream and store the result in trackData and markerData

Throws:
java.io.IOException
Method Detail

parse

public boolean parse(boolean tryToFinish)
              throws org.xml.sax.SAXException,
                     java.io.IOException
Returns:
True if file was properly parsed, false if there was error during parsing but some data were parsed anyway
Throws:
org.xml.sax.SAXException
java.io.IOException


JOSM