Class OSMReader
java.lang.Object
rgu.transport.geospatial.osm.OSMReader
Utility class to read OSM XML files.
- Author:
- Lee A. Christie
-
Method Summary
Modifier and TypeMethodDescriptionstatic voidread(File file, OSMListener listener) Reads OSM data from the specified file to the specified OSM listener.static voidread(InputStream stream, OSMListener listener) Reads OSM data from the specified input stream to the specified OSM listener.
-
Method Details
-
read
Reads OSM data from the specified file to the specified OSM listener.- Parameters:
listener- the listener, not null- Throws:
IOException- if unable to read the OSM dataInterruptedException
-
read
public static void read(InputStream stream, OSMListener listener) throws IOException, InterruptedException Reads OSM data from the specified input stream to the specified OSM listener. The stream is not closed by the reader.- Parameters:
stream- the input stream, not nulllistener- the listener, not null- Throws:
IOException- if unable to read the OSM dataInterruptedException
-