geocodinghere-apideviationproximityapi

Inconcsistent location when radius decreased in HERE Geocoding API


Using the HERE geocoding API (version 6.2) to get LinkIDs from a given location(lat,long).

Example: same coordinates with different radius

Request 1: 50m radius

With this radius the response returns the appropriate LinkIDs at location.

/reversegeocode.json?prox=37.399643,-121.953085,50&mode=retrieveAddresses&locationAttributes=linkInfo&gen=9&app_id={AppID}&app_code={AppCode}

The above query works as expected. See below: enter image description here

Request 2: 5m radius

Now, if we decrease the proximity radius to 5m then HERE API's response jumps to a completely different location.

/reversegeocode.json?prox=37.399643,-121.953085,5&mode=retrieveAddresses&locationAttributes=linkInfo&gen=9&app_id={AppID}&app_code={AppCode}

The above query shows a different, unexpected location.

It's completely wrong. The spot highlighted is actually 5-6 miles away from the correct location.

See image below: enter image description here

Inconsistency suspected

From observation after a few tests, this (unexpected) inconsistent location seems to be returned for proximity radius values < 30 meters.

Can anyone explain this behavior (is it a bug)?


Solution

  • Reverse Geocoder returns street results or addresses on a street only if the street geometry is within the given radius. Otherwise it falls back to area level results and returns the center of the area, where central point of proximity is located.

    Example: (37.399643,-121.953085); Proximity distance = 22m

    With radius 22 the proximity still contains a street geometry. Reverse Geocoder returns one street result which is "ReferenceId": "1121660494". enter image description here

    Example: (37.399643,-121.953085); Proximity distance = 21m;

    With radius 21 – no one street is within the radius. Therefore the Geocoder returns the link that central point of city – Santa Clara is on it. enter image description here