public static class WaySegmentParser.Builder extends Object
Constructor and Description |
---|
Builder(PointAccess nodeAccess) |
Modifier and Type | Method and Description |
---|---|
WaySegmentParser |
build() |
WaySegmentParser.Builder |
setDirectory(Directory directory) |
WaySegmentParser.Builder |
setEdgeHandler(WaySegmentParser.EdgeHandler edgeHandler) |
WaySegmentParser.Builder |
setElevationProvider(ElevationProvider elevationProvider) |
WaySegmentParser.Builder |
setRelationPreprocessor(Consumer<ReaderRelation> relationPreprocessor) |
WaySegmentParser.Builder |
setRelationProcessor(WaySegmentParser.RelationProcessor relationProcessor) |
WaySegmentParser.Builder |
setSplitNodeFilter(Predicate<ReaderNode> splitNodeFilter) |
WaySegmentParser.Builder |
setWayFilter(Predicate<ReaderWay> wayFilter) |
WaySegmentParser.Builder |
setWayPreprocessor(WaySegmentParser.WayPreprocessor wayPreprocessor) |
WaySegmentParser.Builder |
setWorkerThreads(int workerThreads) |
public Builder(PointAccess nodeAccess)
nodeAccess
- used to store tower node coordinates while parsing the wayspublic WaySegmentParser.Builder setDirectory(Directory directory)
directory
- the directory to be used to store temporary datapublic WaySegmentParser.Builder setElevationProvider(ElevationProvider elevationProvider)
elevationProvider
- used to determine the elevation of an OSM nodepublic WaySegmentParser.Builder setWayFilter(Predicate<ReaderWay> wayFilter)
wayFilter
- return true for OSM ways that should be considered and false otherwisepublic WaySegmentParser.Builder setSplitNodeFilter(Predicate<ReaderNode> splitNodeFilter)
splitNodeFilter
- return true if the given OSM node should be duplicated to create an artificial edgepublic WaySegmentParser.Builder setWayPreprocessor(WaySegmentParser.WayPreprocessor wayPreprocessor)
wayPreprocessor
- callback function that is called for each accepted OSM way during the second passpublic WaySegmentParser.Builder setRelationPreprocessor(Consumer<ReaderRelation> relationPreprocessor)
relationPreprocessor
- callback function that receives OSM relations during the first passpublic WaySegmentParser.Builder setRelationProcessor(WaySegmentParser.RelationProcessor relationProcessor)
relationProcessor
- callback function that receives OSM relations during the second passpublic WaySegmentParser.Builder setEdgeHandler(WaySegmentParser.EdgeHandler edgeHandler)
edgeHandler
- callback function that is called for each edge (way segment)public WaySegmentParser.Builder setWorkerThreads(int workerThreads)
workerThreads
- the number of threads used for the low level reading of the OSM filepublic WaySegmentParser build()
Copyright © 2012–2022. All rights reserved.