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 Object implements IGpxReader
Reads an OziExplorer Waypoint file. Based on information from https://www.oziexplorer4.com.- Since:
- 18179
-
-
Constructor Summary
Constructors Constructor Description OziWptReader(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 successfuly 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 InputStream source
-
success
private int success
-
-
Constructor Detail
-
OziWptReader
public OziWptReader(InputStream source) throws IOException
Constructs a newOziWptReader
- Parameters:
source
- Ozi wpt file input stream- Throws:
IOException
- if an I/O error occurs
-
-
Method Detail
-
parse
public boolean parse(boolean tryToFinish) throws SAXException, 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:
SAXException
- if any SAX parsing error occursIOException
- 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 successfuly read.- Specified by:
getNumberOfCoordinates
in interfaceIGpxReader
- Returns:
- the number of coordinates that have been successfuly read
-
-