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 TypeMethodDescriptionvoidclose()voidcomplete()getNext()intbooleanisEOF()open()voidprocess(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:
getNextin interfaceOSMInput- Throws:
XMLStreamException
-
isEOF
public boolean isEOF() -
close
- Specified by:
closein interfaceAutoCloseable- Throws:
IOException
-
process
-
getUnprocessedElements
public int getUnprocessedElements()- Specified by:
getUnprocessedElementsin interfaceOSMInput
-
complete
public void complete()
-