Skip to content

Waypoints in countryinfo differ from actual border crossing #2118

@mwstat

Description

@mwstat

Is there an existing issue for this?

  • I have searched the existing issues

Where did you encounter this issue?

live API

Request URL

https://api.openrouteservice.org/v2/directions/driving-hgv/geojson

POST Request Body

curl -X POST \
  'https://api.openrouteservice.org/v2/directions/driving-hgv/geojson' \
  -H 'Content-Type: application/json; charset=utf-8' \
  -H 'Accept: application/json, application/geo+json, application/gpx+xml, img/png; charset=utf-8' \
  -H 'Authorization: Api_Key' \
  -d '{"coordinates":[[17.11005,47.92503],[17.11254,47.92316]],"extra_info":["waytype","countryinfo"],"instructions":"false","units":"km"}'

Response

Response
{"type":"FeatureCollection","bbox":[17.110047,47.923161,17.112542,47.925028],"features":[{"bbox":[17.110047,47.923161,17.112542,47.925028],"type":"Feature","properties":{"extras":{"waytype":{"values":[[0,5,1]],"summary":[{"value":1,"distance":0,"amount":100}]},"countryinfo":{"values":[[0,4,11],[4,5,88]],"summary":[{"value":11,"distance":0,"amount":84.2},{"value":88,"distance":0,"amount":15.8}]}},"way_points":[0,5],"summary":{"distance":0.282,"duration":29.4}},"geometry":{"coordinates":[[17.110047,47.925028],[17.110051,47.925026],[17.110893,47.924485],[17.112228,47.923612],[17.112313,47.923531],[17.112542,47.923161]],"type":"LineString"}}],"metadata":{"attribution":"openrouteservice.org | OpenStreetMap contributors","service":"routing","timestamp":1755760021124,"query":{"coordinates":[[17.11005,47.92503],[17.11254,47.92316]],"profile":"driving-hgv","profileName":"driving-hgv","format":"geojson","units":"km","extra_info":["waytype","countryinfo"]},"engine":{"version":"9.3.0","build_date":"2025-06-06T15:39:25Z","graph_date":"2025-08-13T00:01:38Z","osm_date":"2025-08-04T00:00:00Z"}}}

Current behavior

The countryinfo tells me that waypoints 0-4 are on Austrian territory (country 11) and waypoints 4-5 are on Hungarian territory (country 88). Therefore, waypoint 4 must be the border crossing. Since waypoint numbering starts with 0, waypoint 4 would be coordinate number 5 (17.112313,47.923531).

However, if I plot this coordinate on a map, I see that it is about 150 metres away from the actual border:

Image

And I see, that waypoint 2 (17.110893,47.924485) would be exactly on the border:

Image

Expected behavior

I would expect that countryinfo tells me that waypoints 0-2 are on Austrian territory (country 11) and waypoints 2-5 are on Hungarian territory (country 88). I.e., that waypoint 2 (17.110893,47.924485) is the border crossing coordinate.

Openrouteservice Version

9.3.0

Build date

No response

Graph date

No response

Forum Topic Link

https://ask.openrouteservice.org/t/waypoints-in-countryinfo-differ-from-actual-border-crossing/7594

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions