0

For some coordinates, the Here isoline API returns the same polygon for all the time distances, regardless of the range[values] value.

The example is for Burlington GO train station, ON, Canada, and changing the coordinates a few meters causes invalid data.

example: curl --location -g --request GET 'https://isoline.router.hereapi.com/v8/isolines?transportMode=pedestrian&range[type]=time&range[values]=50,600&destination=43.339900,-79.809388&apikey=XXXXXX'

{
  "arrival": {
    "time": "2022-08-31T06:28:52+00:00",
    "place": {
      "type": "place",
      "location": {"lat": 43.33981,"lng": -79.80958},
      "originalLocation": { "lat": 43.3399,"lng": -79.8093881}
    }
  },
  "isolines": [
    {
      "range": {"type": "time","value": 50},
      "polygons": [{"outer": "BG86o1yC3mmn4E1C2GhI2C1KAhI1CArF4K1KgI1CiIqB2CgEA4G" }
      ]
    },
    {
      "range": {"type": "time","value": 600},
      "polygons": [{"outer": "BG86o1yC3mmn4E1C2GhI2C1KAhI1CArF4K1KgI1CiIqB2CgEA4G"}
      ]
    }
  ]
}

If I change the coordinates just a few meters, to "lat": 43.3403845, "lng": -79.8089106 then it returns correct isolines.

Is there a best practice when selecting destination coordinates, any extra parameter I should use to make the results more predictable?

I consider this a bug, if you cannot return valid results you should throw an error, not return invalid data to clients.

gdogaru
  • 510
  • 6
  • 24

1 Answers1

0

I think you can get better results if you use the additional parameter "radius" (meters) for the place (lat, lng) that you provided.

This parameter instructs the router to consider all places within the given radius as potential candidates for route calculation. This can be either because it is not important which place is used, or because it is unknown. Radiuses wider than 200 meters are not supported.

For example: destination=43.339900,-79.809388;radius=100.

I hope this information is useful for you.

Regards.

  • Thanks, the minimum radius that worked was 60, which is quite a lot. – gdogaru Sep 01 '22 at 11:33
  • Also, is there any place I can report map problems? That specific train station has a pedestrian crossing over the train tracks, which is not taken into consideration. This makes it so the 5minute walk turns into 40. – gdogaru Sep 01 '22 at 11:33