Not returning extra_info

Hi,
I need the osmId in directions for the foot-hiking profile. I know it’s normally only available on wheelchair, so I modified my ors-config and added "OsmId": {} in my ext_storages object for the foot-hiking profile.

Still, the osmId is not returned. Not even a warning message. When I use the public API, I get "
“Extra info requested but not available: osmid”", but when using my own instance, I don’t get anything beyond the route results. It’s making me wonder if my instance somehow doesn’t acknowledge extras at all? I’ve tried with extras that should be included in the profile by default, like “surface”, and still nothing is returned. I’ve even tried building the wheelchair profile only, and still nothing.

Thanks for your help!

Here’s my test query:

POST http://myprivateinstance:8080/ors/v2/directions/foot-hiking
{
    "coordinates": [
        [
            -9.470355,
            38.772992
        ]
    ],
    "extra_info": [
        "osmid",
        "surface"
    ],
    "options": {
        "round_trip": {
            "length": 5000,
            "points": 3,
            "seed": 1
        }
    }
}

And the result:

{
    "routes": [
        {
            "summary": {
                "distance": 6708.6,
                "duration": 4830.2
            },
            "segments": [
                {
                    "distance": 6708.6,
                    "duration": 4830.2,
                    "steps": [
                        {
                            "distance": 29.7,
                            "duration": 21.4,
                            "type": 11,
                            "instruction": "Head southeast on EN 247",
                            "name": "EN 247",
                            "way_points": [
                                0,
                                4
                            ]
                        },
                        {
                            "distance": 51.6,
                            "duration": 37.2,
                            "type": 0,
                            "instruction": "Turn left",
                            "name": "-",
                            "way_points": [
                                4,
                                7
                            ]
                        },
                        {
                            "distance": 47.5,
                            "duration": 34.2,
                            "type": 3,
                            "instruction": "Turn sharp right",
                            "name": "-",
                            "way_points": [
                                7,
                                11
                            ]
                        },
                        {
                            "distance": 267.1,
                            "duration": 192.3,
                            "type": 0,
                            "instruction": "Turn left",
                            "name": "-",
                            "way_points": [
                                11,
                                21
                            ]
                        },
                        {
                            "distance": 66.6,
                            "duration": 48.0,
                            "type": 0,
                            "instruction": "Turn left",
                            "name": "-",
                            "way_points": [
                                21,
                                25
                            ]
                        },
                        {
                            "distance": 506.4,
                            "duration": 364.6,
                            "type": 13,
                            "instruction": "Keep right",
                            "name": "-",
                            "way_points": [
                                25,
                                53
                            ]
                        },
                        {
                            "distance": 118.1,
                            "duration": 85.0,
                            "type": 5,
                            "instruction": "Turn slight right onto Viúva",
                            "name": "Viúva",
                            "way_points": [
                                53,
                                57
                            ]
                        },
                        {
                            "distance": 450.4,
                            "duration": 324.2,
                            "type": 0,
                            "instruction": "Turn left onto Viúva",
                            "name": "Viúva",
                            "way_points": [
                                57,
                                78
                            ]
                        },
                        {
                            "distance": 64.9,
                            "duration": 46.7,
                            "type": 13,
                            "instruction": "Keep right",
                            "name": "-",
                            "way_points": [
                                78,
                                80
                            ]
                        },
                        {
                            "distance": 168.8,
                            "duration": 121.5,
                            "type": 6,
                            "instruction": "Continue straight",
                            "name": "-",
                            "way_points": [
                                80,
                                87
                            ]
                        },
                        {
                            "distance": 165.5,
                            "duration": 119.1,
                            "type": 0,
                            "instruction": "Turn left",
                            "name": "-",
                            "way_points": [
                                87,
                                98
                            ]
                        },
                        {
                            "distance": 67.3,
                            "duration": 48.4,
                            "type": 0,
                            "instruction": "Turn left onto Turfas (Pt.1)",
                            "name": "Turfas (Pt.1)",
                            "way_points": [
                                98,
                                104
                            ]
                        },
                        {
                            "distance": 4.4,
                            "duration": 3.2,
                            "type": 0,
                            "instruction": "Turn left",
                            "name": "-",
                            "way_points": [
                                104,
                                105
                            ]
                        },
                        {
                            "distance": 187.7,
                            "duration": 135.2,
                            "type": 1,
                            "instruction": "Turn right onto Turfas (Pt.2)",
                            "name": "Turfas (Pt.2)",
                            "way_points": [
                                105,
                                114
                            ]
                        },
                        {
                            "distance": 52.2,
                            "duration": 37.5,
                            "type": 13,
                            "instruction": "Keep right onto Turfas (Pt.2)",
                            "name": "Turfas (Pt.2)",
                            "way_points": [
                                114,
                                117
                            ]
                        },
                        {
                            "distance": 603.1,
                            "duration": 434.3,
                            "type": 0,
                            "instruction": "Turn left",
                            "name": "-",
                            "way_points": [
                                117,
                                131
                            ]
                        },
                        {
                            "distance": 172.2,
                            "duration": 124.0,
                            "type": 4,
                            "instruction": "Turn slight left",
                            "name": "-",
                            "way_points": [
                                131,
                                137
                            ]
                        },
                        {
                            "distance": 266.9,
                            "duration": 192.2,
                            "type": 13,
                            "instruction": "Keep right",
                            "name": "-",
                            "way_points": [
                                137,
                                144
                            ]
                        },
                        {
                            "distance": 209.9,
                            "duration": 151.1,
                            "type": 1,
                            "instruction": "Turn right",
                            "name": "-",
                            "way_points": [
                                144,
                                147
                            ]
                        },
                        {
                            "distance": 44.0,
                            "duration": 31.7,
                            "type": 5,
                            "instruction": "Turn slight right",
                            "name": "-",
                            "way_points": [
                                147,
                                149
                            ]
                        },
                        {
                            "distance": 395.8,
                            "duration": 285.0,
                            "type": 0,
                            "instruction": "Turn left",
                            "name": "-",
                            "way_points": [
                                149,
                                163
                            ]
                        },
                        {
                            "distance": 51.9,
                            "duration": 37.4,
                            "type": 0,
                            "instruction": "Turn left onto EN 247",
                            "name": "EN 247",
                            "way_points": [
                                163,
                                165
                            ]
                        },
                        {
                            "distance": 452.6,
                            "duration": 325.9,
                            "type": 3,
                            "instruction": "Turn sharp right",
                            "name": "-",
                            "way_points": [
                                165,
                                180
                            ]
                        },
                        {
                            "distance": 136.2,
                            "duration": 98.1,
                            "type": 2,
                            "instruction": "Turn sharp left",
                            "name": "-",
                            "way_points": [
                                180,
                                186
                            ]
                        },
                        {
                            "distance": 195.3,
                            "duration": 140.6,
                            "type": 0,
                            "instruction": "Turn left",
                            "name": "-",
                            "way_points": [
                                186,
                                191
                            ]
                        },
                        {
                            "distance": 136.6,
                            "duration": 98.4,
                            "type": 1,
                            "instruction": "Turn right onto EN 247",
                            "name": "EN 247",
                            "way_points": [
                                191,
                                198
                            ]
                        },
                        {
                            "distance": 906.1,
                            "duration": 652.4,
                            "type": 6,
                            "instruction": "Continue straight onto EN 247",
                            "name": "EN 247",
                            "way_points": [
                                198,
                                222
                            ]
                        },
                        {
                            "distance": 98.3,
                            "duration": 70.8,
                            "type": 0,
                            "instruction": "Turn left onto Caminho do Rio Touro",
                            "name": "Caminho do Rio Touro",
                            "way_points": [
                                222,
                                228
                            ]
                        },
                        {
                            "distance": 629.4,
                            "duration": 453.1,
                            "type": 1,
                            "instruction": "Turn right onto Caminho do Rio Touro",
                            "name": "Caminho do Rio Touro",
                            "way_points": [
                                228,
                                248
                            ]
                        },
                        {
                            "distance": 132.6,
                            "duration": 95.5,
                            "type": 1,
                            "instruction": "Turn right",
                            "name": "-",
                            "way_points": [
                                248,
                                255
                            ]
                        },
                        {
                            "distance": 29.7,
                            "duration": 21.4,
                            "type": 2,
                            "instruction": "Turn sharp left onto EN 247",
                            "name": "EN 247",
                            "way_points": [
                                255,
                                259
                            ]
                        },
                        {
                            "distance": 0.0,
                            "duration": 0.0,
                            "type": 10,
                            "instruction": "Arrive at EN 247, on the right",
                            "name": "-",
                            "way_points": [
                                259,
                                259
                            ]
                        }
                    ]
                }
            ],
            "bbox": [
                -9.474179,
                38.761196,
                -9.456079,
                38.773642
            ],
            "geometry": "czskFvtxx@??LWNODCCa@RYRg@Jd@JTFFT?Vg@jAyAb@{@j@[f@o@Ti@Ji@CiAGe@HGGMh@{@FS?a@DUFy@@gAFQH_@FCLIRm@\\ENIZe@?]JQlAgA\\q@LIDQ?Qj@c@@o@DM?OBe@CeAHi@Ng@b@_@Vs@`@a@Rc@lAmBFSQg@G{ALWVa@FQR_ABQKe@MYEUMSa@YSAiBJSE]]QWW_@k@]iAy@[c@c@mA[o@Ag@@eAGYo@y@UA[KW}AYDWCYGO?YH[b@Ob@E\\U^SNWDEL[TG?CJi@@KNBFKFQRUd@Eb@I\\MZS`B?j@IvAONa@Ha@RRnATj@`@`@`CpA`@d@z@`AfAvF\\tAT|@`@bAVv@^fCFz@OjAp@vBd@j@JLn@Pt@F^El@Gl@Cd@V`AxBHNLD|DcAX|FRnBDpBMZK`A|AnANTd@b@vAbBTTR^Nf@n@nCb@h@\\PX@`@YLAXXJYXsAFXPLz@OjAP^P|@Hj@Av@W^GfCiAb@OT?l@^\\LjBBAO@SCaBUoB?e@CYoBwAB}AGkBK}@IITWRO`A]ROVg@Je@Bc@Cb@Kd@Wf@SNaA\\SNUVOXY|@e@jDKVKLgHvEqCnA[ZWt@YrAKXkBzBa@`@iBtAWJQ@yACO^MD[@c@Fs@XIFECOAUBm@R[^y@FuAEmBP_ADu@CiAY]Si@o@wAqBMYKa@yAeC_AkBUGODQwBIi@KQ@YEODO?u@EBONMV??",
            "way_points": [
                0,
                259
            ]
        }
    ],
    "bbox": [
        -9.474179,
        38.761196,
        -9.456079,
        38.773642
    ],
    "metadata": {
        "attribution": "openrouteservice.org, OpenStreetMap contributors",
        "service": "routing",
        "timestamp": 1682084907948,
        "query": {
            "coordinates": [
                [
                    -9.470355,
                    38.772992
                ]
            ],
            "profile": "foot-hiking",
            "format": "json",
            "extra_info": [
                "osmid",
                "surface"
            ],
            "options": {
                "round_trip": {
                    "length": 5000.0,
                    "points": 3,
                    "seed": 1
                }
            }
        },
        "engine": {
            "version": "7.0.1",
            "build_date": "2023-03-08T12:06:41Z",
            "graph_date": "2023-04-21T13:29:38Z"
        }
    }
}

Hi @tanka1

could you provide the ors-config.json you are using for your local instance?

Best regards

Sure, thank you.

{
  "ors": {
    "info": {
      "base_url": "https://openrouteservice.org/",
      "swagger_documentation_url": "https://api.openrouteservice.org/",
      "support_mail": "support@openrouteservice.org",
      "author_tag": "openrouteservice",
      "content_licence": "LGPL 3.0"
    },
    "services": {
      "matrix": {
        "enabled": true,
        "maximum_routes": 100,
        "maximum_routes_flexible": 25,
        "maximum_search_radius": 5000,
        "maximum_visited_nodes": 100000,
        "allow_resolve_locations": true,
        "attribution": "openrouteservice.org, OpenStreetMap contributors"
      },
      "isochrones": {
        "enabled": true,
        "maximum_range_distance": [
          {
            "profiles": "any",
            "value": 50000
          },
          {
            "profiles": "driving-car, driving-hgv",
            "value": 100000
          }
        ],
        "maximum_range_time": [
          {
            "profiles": "any",
            "value": 18000
          },
          {
            "profiles": "driving-car, driving-hgv",
            "value": 3600
          }
        ],
        "fastisochrones": {
          "maximum_range_distance": [
            {
              "profiles": "any",
              "value": 50000
            },
            {
              "profiles": "driving-car, driving-hgv",
              "value": 500000
            }
          ],
          "maximum_range_time": [
            {
              "profiles": "any",
              "value": 18000
            },
            {
              "profiles": "driving-car, driving-hgv",
              "value": 10800
            }
          ],
          "profiles": {
            "default_params": {
              "enabled": false,
              "threads": 12,
              "weightings": "recommended",
              "maxcellnodes": 5000
            },
            "hgv": {
              "enabled": false,
              "threads": 12,
              "weightings": "recommended, shortest",
              "maxcellnodes": 5000
            }
          }
        },
        "maximum_intervals": 10,
        "maximum_locations": 2,
        "allow_compute_area": true
      },
      "routing": {
        "enabled": true,
        "mode": "normal",
        "routing_description": "This is a routing file from openrouteservice",
        "routing_name": "openrouteservice routing",
        "sources": [
          "/home/ors/ors-core/data/osm_file.pbf"
        ],
        "init_threads": 1,
        "attribution": "openrouteservice.org, OpenStreetMap contributors",
        "elevation_preprocessed": false,
        "profiles": {
          "active": [
             "hiking",
	           "wheelchair"
          ],
          "default_params": {
            "encoder_flags_size": 8,
            "graphs_root_path": "/home/ors/ors-core/data/graphs",
            "elevation_provider": "multi",
            "elevation_cache_path": "/home/ors/ors-core/data/elevation_cache",
            "elevation_cache_clear": false,
            "instructions": true,
            "maximum_distance": 100000,
            "maximum_distance_dynamic_weights": 100000,
            "maximum_distance_avoid_areas": 100000,
            "maximum_waypoints": 50,
            "maximum_snapping_radius": 400,
            "maximum_avoid_polygon_area": 200000000,
            "maximum_avoid_polygon_extent": 20000,
            "maximum_distance_alternative_routes": 100000,
            "maximum_alternative_routes": 3,
            "maximum_distance_round_trip_routes": 100000,
            "maximum_speed_lower_bound": 80,
            "preparation": {
              "min_network_size": 200,
              "min_one_way_network_size": 200,
              "methods": {
                "lm": {
                  "enabled": true,
                  "threads": 1,
                  "weightings": "recommended,shortest",
                  "landmarks": 16
                }
              }
            },
            "execution": {
              "methods": {
                "lm": {
                  "active_landmarks": 8
                }
              }
            }
          },
          "profile-car": {
            "profiles": "driving-car",
            "parameters": {
              "encoder_flags_size": 8,
              "encoder_options": "turn_costs=true|block_fords=false|use_acceleration=true",
              "maximum_distance": 100000,
              "elevation": true,
              "maximum_snapping_radius": 350,
              "preparation": {
                "min_network_size": 200,
                "min_one_way_network_size": 200,
                "methods": {
                  "ch": {
                    "enabled": true,
                    "threads": 1,
                    "weightings": "fastest"
                  },
                  "lm": {
                    "enabled": false,
                    "threads": 1,
                    "weightings": "fastest,shortest",
                    "landmarks": 16
                  },
                  "core": {
                    "enabled": true,
                    "threads": 1,
                    "weightings": "fastest,shortest",
                    "landmarks": 64,
                    "lmsets": "highways;allow_all"
                  }
                }
              },
              "execution": {
                "methods": {
                  "lm": {
                    "active_landmarks": 6
                  },
                  "core": {
                    "disabling_allowed": true,
                    "active_landmarks": 6
                  }
                }
              },
              "ext_storages": {
                "WayCategory": {},
                "HeavyVehicle": {},
                "WaySurfaceType": {},
                "RoadAccessRestrictions": {
                  "use_for_warnings": true
                }
              }
            }
          },
          "profile-hgv": {
            "profiles": "driving-hgv",
            "parameters": {
              "encoder_flags_size": 8,
              "encoder_options": "turn_costs=true|block_fords=false|use_acceleration=true",
              "maximum_distance": 100000,
              "elevation": true,
              "preparation": {
                "min_network_size": 200,
                "min_one_way_network_size": 200,
                "methods": {
                  "ch": {
                    "enabled": true,
                    "threads": 1,
                    "weightings": "recommended"
                  },
                  "core": {
                    "enabled": true,
                    "threads": 1,
                    "weightings": "recommended,shortest",
                    "landmarks": 64,
                    "lmsets": "highways;allow_all"
                  }
                }
              },
              "execution": {
                "methods": {
                  "core": {
                    "disabling_allowed": true,
                    "active_landmarks": 6
                  }
                }
              },
              "ext_storages": {
                "WayCategory": {},
                "HeavyVehicle": {
                  "restrictions": true
                },
                "WaySurfaceType": {}
              }
            }
          },
          "profile-bike-regular": {
            "profiles": "cycling-regular",
            "parameters": {
              "encoder_options": "consider_elevation=true|turn_costs=true|block_fords=false",
              "elevation": true,
              "ext_storages": {
                "WayCategory": {},
                "WaySurfaceType": {},
                "HillIndex": {},
                "TrailDifficulty": {}
              }
            }
          },
          "profile-bike-mountain": {
            "profiles": "cycling-mountain",
            "parameters": {
              "encoder_options": "consider_elevation=true|turn_costs=true|block_fords=false",
              "elevation": true,
              "ext_storages": {
                "WayCategory": {},
                "WaySurfaceType": {},
                "HillIndex": {},
                "TrailDifficulty": {}
              }
            }
          },
          "profile-bike-road": {
            "profiles": "cycling-road",
            "parameters": {
              "encoder_options": "consider_elevation=true|turn_costs=true|block_fords=false",
              "elevation": true,
              "ext_storages": {
                "WayCategory": {},
                "WaySurfaceType": {},
                "HillIndex": {},
                "TrailDifficulty": {}
              }
            }
          },
          "profile-bike-electric": {
            "profiles": "cycling-electric",
            "parameters": {
              "encoder_options": "consider_elevation=true|turn_costs=true|block_fords=false",
              "elevation": true,
              "ext_storages": {
                "WayCategory": {},
                "WaySurfaceType": {},
                "HillIndex": {},
                "TrailDifficulty": {}
              }
            }
          },
          "profile-walking": {
            "profiles": "foot-walking",
            "parameters": {
              "encoder_options": "block_fords=false",
              "elevation": true,
              "ext_storages": {
                "WayCategory": {},
                "WaySurfaceType": {},
                "HillIndex": {},
                "TrailDifficulty": {}
              }
            }
          },
          "profile-hiking": {
            "profiles": "foot-hiking",
            "parameters": {
              "encoder_options": "block_fords=false",
              "elevation": true,
              "ext_storages": {
                "WayCategory": {},
                "WaySurfaceType": {},
                "HillIndex": {},
                "TrailDifficulty": {},
	              "OsmId": {}
              }
            }
          },
          "profile-wheelchair": {
            "profiles": "wheelchair",
            "parameters": {
              "encoder_options": "block_fords=true",
              "elevation": true,
              "maximum_snapping_radius": 50,
              "ext_storages": {
                "WayCategory": {},
                "WaySurfaceType": {},
                "Wheelchair": {
                  "KerbsOnCrossings": "true"
                },
                "OsmId": {}
              }
            }
          }
        }
      }
    },
    "logging": {
      "enabled": true,
      "level_file": "DEBUG_LOGGING.json",
      "location": "/home/ors/ors-core/logs/ors",
      "stdout": true
    },
    "system_message": [
      {
        "active": false,
        "text": "This message would be sent with every routing bike fastest request",
        "condition": {
          "request_service": "routing",
          "request_profile": "cycling-regular,cycling-mountain,cycling-road,cycling-electric",
          "request_preference": "fastest"
        }
      },
      {
        "active": false,
        "text": "This message would be sent with every request for geojson response",
        "condition": {
          "api_format": "geojson"
        }
      },
      {
        "active": false,
        "text": "This message would be sent with every request on API v1 from January 2020 until June 2050",
        "condition": {
          "api_version": 1,
          "time_after": "2020-01-01T00:00:00Z",
          "time_before": "2050-06-01T00:00:00Z"
        }
      },
      {
        "active": false,
        "text": "This message would be sent with every request"
      }
    ]
  }
}

Hey @tanka1,

did you force a rebuild of the graphs after changing the config?

Best regards

Yes I always delete the graphs folder after changing the config file. And I can validate that the graphs are properly rebuilt, because the other features of the API work well with the new changes.

This is all very strange. I literally followed the instructions of the installation guide word for word. I’m using the GitHub repo, and docker inside the docker directory. I haven’t changed anything except for the pbf file used.

I’m suspecting there is a bug in your code… Maybe someone could replicate installing the latest version and validate that the extra_info are not returned?

Next is I might try to check what version of ORS your public instance is running, and see if I can maybe deploy that exact same version. Also, a bit off topic but I’d like to say that I’d be willing to pay if you offered managed hosting services. I wouldn’t mind paying 2x what it would cost to host myself, if it was managed by a third party, and I still could tweak what profiles are activated, what pbf is being used and what extra_info are returned. Don’t know if it’s in your horizon.

Hmm sounds indeed like a bug. Could you open an issue in our backend repo and copy over the details?

I fixed it by using the v6.8.1 (which is what the public instance uses).

Steps for people stuck with the same problem:

Follow the rest of the official installation instructions, and extras will be returned.

So it looks like this bug was introduced somewhere between 6.8.1 and the latest release. Something must be breaking it. Maybe it’d be worth adding a test that checks for the presence of “extras” in your release process.

Thanks for your help @amandus.

Hi,
I use public version 7.1.0 and do not get extras with options “round_trip”. Without “round_trip” it works. What can I do?

As I’ve shared above, your best bet is to downgrade to v6.8.1