[ASK] How much default routing car speed?

Hello,
How much default routing car speed for each highways tag (trunk, primary, motorway, etc) and smoothness tag (excellent, good, etc)?

I have read this site graphhopper/custom-models.md at master · graphhopper/graphhopper · GitHub, I still googling it but not found any reference.

For example, if I set custom profile where

{
  "speed": [
    {
      "if": "urban_density == CITY",
      "multiply_by": "0.3"
    },
    {
      "if": "urban_density == RESIDENTIAL",
      "multiply_by": "0.5"
    },
    {
      "if": "urban_density == RURAL",
      "multiply_by": "0.7"
    }
  ]
}
  1. Then what is the number that multiply by graphhopper?

  1. In this picture, If some segment has smoothness tags inside that PBF file, has the value will calculate by 3 factor?
default speed * urban_density_factor * smoothness_factor * highways_tags_factor

Thanks for any answer :grinning:

When you enable ‘Show Routing Graph’ in the layers menu you can hover the roads to see the different road attributes. There should be also car_average_speed, foot_average_speed etc. This is the definite speed that will be multiplied with the factors you set in your custom_model.

The speeds depend on the road type and are given here:

(and similar for the other vehicles/profiles).

But note that besides the road class also maxspeed, the surface of the road etc. might be taken into account and they are multiplied by 0.9:

1 Like

Thanks for detailed answer… :grinning:

But, I don’t get the car_average_speed and foot_average_speed in “show routing graph”. What’s wrong with that?

FYI, I Don’t write custom profile in graphhopper GUI in localhost:8989. I wrote that custom profile in config.yaml.

# config.yaml
graphhopper:
  datareader.file: rmy_own_road_network.osm.pbf
  graph.location: graphs/my_road_network
    
  profiles:
    - name: foot
      vehicle: foot
      weighting: fastest
    - name: car
      vehicle: car
      weighting: custom
      custom_model_file: urban_density.json
    - name: bike
      vehicle: bike
      weighting: custom
      custom_model_file: bike3.json
  
  custom_model_folder: custom_models
  
  graph.urban_density.threads: 8
  graph.urban_density.residential_radius: 300
  graph.urban_density.residential_sensitivity: 60
  graph.urban_density.city_radius: 2000
  graph.urban_density.city_sensitivity: 30

  graph.elevation.provider: srtm
  graph.elevation.cache_dir: ./srtmprovider/
  
  graph.vehicles: roads|transportation_mode=HGV,car
  graph.encoded_values: max_slope, average_slope, toll,hgv,surface,max_width,max_height
  
server:
  application_connectors:
    - type: http
      port: 8989
      bind_host: localhost
  admin_connectors:
    - type: http
      port: 8990
      bind_host: localhost

And the custom profile in urban_density.json contains

{
  "speed": [
    {
      "if": "urban_density == CITY",
      "multiply_by": "0.3"
    },
    {
      "if": "urban_density == RESIDENTIAL",
      "multiply_by": "0.5"
    },
    {
      "if": "urban_density == RURAL",
      "multiply_by": "0.7"
    }
  ]
}

But, I don’t get the car_average_speed, urban_density, etc in “show routing graph” layer.

It is strange,
If I put empty bracket { } in custom profile (at localhost:8989), the average_speed will show but, urban_density doesn’t show

Whats wrong with my graphhopper?

You are looking at the urban density layer, not the routing graph layer (or maybe both)? Make sure you enable only the ‘Show Routing Graph’ checkbox, not ‘Show Urban Density’. Then you should be able to hover every single road to see its attributes like this:

image

which also shows you the speed.

The diagram in the bottom right corner shows different road attributes for the current path.

1 Like

thank you, I will try this week your suggestion. I will create a new thread If I found any problem

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.