Package com.graphhopper.reader.osm
Class WaySegmentParser.Builder
java.lang.Object
com.graphhopper.reader.osm.WaySegmentParser.Builder
- Enclosing class:
- WaySegmentParser
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbuild()setEdgeHandler(WaySegmentParser.EdgeHandler edgeHandler) setElevationProvider(ToDoubleFunction<ReaderNode> elevationProvider) setRelationPreprocessor(Consumer<ReaderRelation> relationPreprocessor) setRelationProcessor(WaySegmentParser.RelationProcessor relationProcessor) setSplitNodeFilter(Predicate<ReaderNode> splitNodeFilter) setWayFilter(Predicate<ReaderWay> wayFilter) setWayPreprocessor(WaySegmentParser.WayPreprocessor wayPreprocessor) setWorkerThreads(int workerThreads)
-
Constructor Details
-
Builder
- Parameters:
pointAccess- used to store tower node coordinates while parsing the waysdirectory- the directory to be used to store temporary data
-
-
Method Details
-
setElevationProvider
public WaySegmentParser.Builder setElevationProvider(ToDoubleFunction<ReaderNode> elevationProvider) - Parameters:
elevationProvider- used to determine the elevation of an OSM node
-
setWayFilter
- Parameters:
wayFilter- return true for OSM ways that should be considered and false otherwise
-
setSplitNodeFilter
- Parameters:
splitNodeFilter- return true if the given OSM node should be duplicated to create an artificial edge
-
setWayPreprocessor
public WaySegmentParser.Builder setWayPreprocessor(WaySegmentParser.WayPreprocessor wayPreprocessor) - Parameters:
wayPreprocessor- callback function that is called for each accepted OSM way during the second pass
-
setRelationPreprocessor
public WaySegmentParser.Builder setRelationPreprocessor(Consumer<ReaderRelation> relationPreprocessor) - Parameters:
relationPreprocessor- callback function that receives OSM relations during the first pass
-
setRelationProcessor
public WaySegmentParser.Builder setRelationProcessor(WaySegmentParser.RelationProcessor relationProcessor) - Parameters:
relationProcessor- callback function that receives OSM relations during the second pass
-
setEdgeHandler
- Parameters:
edgeHandler- callback function that is called for each edge (way segment)
-
setWorkerThreads
- Parameters:
workerThreads- the number of threads used for the low level reading of the OSM file
-
build
-