Package com.graphhopper.reader.osm
Class OSMInputFile
java.lang.Object
com.graphhopper.reader.osm.OSMInputFile
- All Implemented Interfaces:
OSMInput
,Sink
,AutoCloseable
A readable OSM file.
- Author:
- Nop
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
close()
void
complete()
getNext()
int
boolean
isEOF()
open()
void
process
(ReaderElement item) setSkipOptions
(SkipOptions skipOptions) Use this to prevent the creation of OSM nodes, ways and/or relations to speed up the file reading process.setWorkerThreads
(int threads) Currently only for pbf format.
-
Constructor Details
-
OSMInputFile
- Throws:
IOException
-
-
Method Details
-
open
- Throws:
XMLStreamException
-
setWorkerThreads
Currently only for pbf format. Default is number of cores. -
setSkipOptions
Use this to prevent the creation of OSM nodes, ways and/or relations to speed up the file reading process. This will only affect the reading of pbf files. -
getNext
- Specified by:
getNext
in interfaceOSMInput
- Throws:
XMLStreamException
-
isEOF
public boolean isEOF() -
close
- Specified by:
close
in interfaceAutoCloseable
- Throws:
IOException
-
process
-
getUnprocessedElements
public int getUnprocessedElements()- Specified by:
getUnprocessedElements
in interfaceOSMInput
-
complete
public void complete()
-