Package org.openstreetmap.josm.io.ozi
Class OziWptReader
- java.lang.Object
-
- org.openstreetmap.josm.io.ozi.OziWptReader
-
- All Implemented Interfaces:
IGpxReader
public class OziWptReader extends java.lang.Object implements IGpxReader
Reads an OziExplorer Waypoint file. Based on information from https://www.oziexplorer4.com.- Since:
- 18179
-
-
Field Summary
Fields Modifier and Type Field Description private GpxDatadataprivate static intIDX_DESCprivate static intIDX_ELEprivate static intIDX_LATprivate static intIDX_LONprivate static intIDX_NAMEprivate static intINVALID_ELEprivate java.io.InputStreamsourceprivate intsuccess
-
Constructor Summary
Constructors Constructor Description OziWptReader(java.io.InputStream source)Constructs a newOziWptReader
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description GpxDatagetGpxData()Replies the GPX data.intgetNumberOfCoordinates()Returns the number of coordinates that have been successfully read.booleanparse(boolean tryToFinish)Parse the GPX data.
-
-
-
Field Detail
-
IDX_NAME
private static final int IDX_NAME
- See Also:
- Constant Field Values
-
IDX_LAT
private static final int IDX_LAT
- See Also:
- Constant Field Values
-
IDX_LON
private static final int IDX_LON
- See Also:
- Constant Field Values
-
IDX_DESC
private static final int IDX_DESC
- See Also:
- Constant Field Values
-
IDX_ELE
private static final int IDX_ELE
- See Also:
- Constant Field Values
-
INVALID_ELE
private static final int INVALID_ELE
- See Also:
- Constant Field Values
-
source
private final java.io.InputStream source
-
success
private int success
-
-
Constructor Detail
-
OziWptReader
public OziWptReader(java.io.InputStream source) throws java.io.IOException
Constructs a newOziWptReader- Parameters:
source- Ozi wpt file input stream- Throws:
java.io.IOException- if an I/O error occurs
-
-
Method Detail
-
parse
public boolean parse(boolean tryToFinish) throws org.xml.sax.SAXException, java.io.IOException
Description copied from interface:IGpxReaderParse the GPX data.- Specified by:
parsein interfaceIGpxReader- Parameters:
tryToFinish- true, if the reader should return at least part of the GPX data in case of an error.- 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- if any SAX parsing error occursjava.io.IOException- if any I/O error occurs
-
getGpxData
public GpxData getGpxData()
Description copied from interface:IGpxReaderReplies the GPX data.- Specified by:
getGpxDatain interfaceIGpxReader- Returns:
- The GPX data
-
getNumberOfCoordinates
public int getNumberOfCoordinates()
Description copied from interface:IGpxReaderReturns the number of coordinates that have been successfully read.- Specified by:
getNumberOfCoordinatesin interfaceIGpxReader- Returns:
- the number of coordinates that have been successfully read
-
-