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 GpxData
data
private static int
IDX_DESC
private static int
IDX_ELE
private static int
IDX_LAT
private static int
IDX_LON
private static int
IDX_NAME
private static int
INVALID_ELE
private java.io.InputStream
source
private int
success
-
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 GpxData
getGpxData()
Replies the GPX data.int
getNumberOfCoordinates()
Returns the number of coordinates that have been successfully read.boolean
parse(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:IGpxReader
Parse the GPX data.- Specified by:
parse
in 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:IGpxReader
Replies the GPX data.- Specified by:
getGpxData
in interfaceIGpxReader
- Returns:
- The GPX data
-
getNumberOfCoordinates
public int getNumberOfCoordinates()
Description copied from interface:IGpxReader
Returns the number of coordinates that have been successfully read.- Specified by:
getNumberOfCoordinates
in interfaceIGpxReader
- Returns:
- the number of coordinates that have been successfully read
-
-