Class OSMReaderConfig

java.lang.Object
com.graphhopper.routing.OSMReaderConfig

public class OSMReaderConfig extends Object
  • Constructor Details

    • OSMReaderConfig

      public OSMReaderConfig()
  • Method Details

    • getIgnoredHighways

      public List<String> getIgnoredHighways()
    • setIgnoredHighways

      public OSMReaderConfig setIgnoredHighways(List<String> ignoredHighways)
      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

      public String getPreferredLanguage()
    • setPreferredLanguage

      public OSMReaderConfig setPreferredLanguage(String preferredLanguage)
      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

      public OSMReaderConfig setParseWayNames(boolean parseWayNames)
      Enables/disables the parsing of the name and ref tags to set the name of the graph edges
    • getMaxWayPointDistance

      public double getMaxWayPointDistance()
    • setMaxWayPointDistance

      public OSMReaderConfig setMaxWayPointDistance(double maxWayPointDistance)
      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

      public OSMReaderConfig setElevationMaxWayPointDistance(double elevationMaxWayPointDistance)
      Sets the max elevation discrepancy between way points and the simplified polyline in meters
    • getElevationSmoothing

      public String getElevationSmoothing()
    • setElevationSmoothing

      public OSMReaderConfig setElevationSmoothing(String smoothElevation)
      Enables/disables elevation smoothing
    • getElevationSmoothingRamerMax

      public int getElevationSmoothingRamerMax()
    • setElevationSmoothingRamerMax

      public OSMReaderConfig setElevationSmoothingRamerMax(int max)
    • getSmoothElevationAverageWindowSize

      public double getSmoothElevationAverageWindowSize()
    • setSmoothElevationAverageWindowSize

      public void setSmoothElevationAverageWindowSize(double smoothElevationAverageWindowSize)
    • getLongEdgeSamplingDistance

      public double getLongEdgeSamplingDistance()
    • setLongEdgeSamplingDistance

      public OSMReaderConfig setLongEdgeSamplingDistance(double longEdgeSamplingDistance)
      Sets the distance between elevation samples on long edges
    • getWorkerThreads

      public int getWorkerThreads()
    • setWorkerThreads

      public OSMReaderConfig setWorkerThreads(int workerThreads)
      Sets the number of threads used for the OSM import
    • getDefaultElevation

      public double getDefaultElevation()
    • setDefaultElevation

      public OSMReaderConfig setDefaultElevation(double defaultElevation)
      Sets the elevation in meters that shall be used if the elevation data source is missing a value