Package com.graphhopper.routing
Class OSMReaderConfig
java.lang.Object
com.graphhopper.routing.OSMReaderConfig
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiondouble
double
int
double
double
double
int
boolean
setDefaultElevation
(double defaultElevation) Sets the elevation in meters that shall be used if the elevation data source is missing a valuesetElevationMaxWayPointDistance
(double elevationMaxWayPointDistance) Sets the max elevation discrepancy between way points and the simplified polyline in meterssetElevationSmoothing
(String smoothElevation) Enables/disables elevation smoothingsetElevationSmoothingRamerMax
(int max) setIgnoredHighways
(List<String> ignoredHighways) Sets the values of the highway tag that shall be ignored when we read the OSM file.setLongEdgeSamplingDistance
(double longEdgeSamplingDistance) Sets the distance between elevation samples on long edgessetMaxWayPointDistance
(double maxWayPointDistance) This parameter affects the routine used to simplify the edge geometries (Ramer-Douglas-Peucker).setParseWayNames
(boolean parseWayNames) Enables/disables the parsing of the name and ref tags to set the name of the graph edgessetPreferredLanguage
(String preferredLanguage) Sets the language used to parse way names.void
setSmoothElevationAverageWindowSize
(double smoothElevationAverageWindowSize) setWorkerThreads
(int workerThreads) Sets the number of threads used for the OSM import
-
Constructor Details
-
OSMReaderConfig
public OSMReaderConfig()
-
-
Method Details
-
getIgnoredHighways
-
setIgnoredHighways
Sets the values of the highway tag that shall be ignored when we read the OSM file. This can be used to speed up the import and reduce the size of the resulting routing graph. For example if one is only interested in routing for motorized vehicles the routing graph size can be reduced by excluding footways, cycleways, paths and/or tracks. This can be quite significant depending on your area. Not only are there fewer ways to be processed, but there are also fewer junctions, which means fewer nodes and edges. Another reason to exclude footways etc. for motorized vehicle routing could be preventing undesired u-turns (#1858). Similarly, one could exclude motorway, trunk or even primary highways for bicycle or pedestrian routing. -
getPreferredLanguage
-
setPreferredLanguage
Sets the language used to parse way names. For example if this is set to 'en' we will use the 'name:en' tag rather than the 'name' tag if it is present. The language code should be given as defined in ISO 639-1 or ISO 639-2. This setting becomes irrelevant if parseWayNames is set to false. -
isParseWayNames
public boolean isParseWayNames() -
setParseWayNames
Enables/disables the parsing of the name and ref tags to set the name of the graph edges -
getMaxWayPointDistance
public double getMaxWayPointDistance() -
setMaxWayPointDistance
This parameter affects the routine used to simplify the edge geometries (Ramer-Douglas-Peucker). Higher values mean more details are preserved. The default is 1 (meter). Simplification can be disabled by setting it to 0. -
getElevationMaxWayPointDistance
public double getElevationMaxWayPointDistance() -
setElevationMaxWayPointDistance
Sets the max elevation discrepancy between way points and the simplified polyline in meters -
getElevationSmoothing
-
setElevationSmoothing
Enables/disables elevation smoothing -
getElevationSmoothingRamerMax
public int getElevationSmoothingRamerMax() -
setElevationSmoothingRamerMax
-
getSmoothElevationAverageWindowSize
public double getSmoothElevationAverageWindowSize() -
setSmoothElevationAverageWindowSize
public void setSmoothElevationAverageWindowSize(double smoothElevationAverageWindowSize) -
getLongEdgeSamplingDistance
public double getLongEdgeSamplingDistance() -
setLongEdgeSamplingDistance
Sets the distance between elevation samples on long edges -
getWorkerThreads
public int getWorkerThreads() -
setWorkerThreads
Sets the number of threads used for the OSM import -
getDefaultElevation
public double getDefaultElevation() -
setDefaultElevation
Sets the elevation in meters that shall be used if the elevation data source is missing a value
-