Jean Basoni
Jean Basoni

Reputation: 3

Is returning the same geolocation to different addresses, how to solve?

The only difference between the two addresses is the number(housenumber).

Request_1: https://geocoder.api.here.com/6.2/geocode.json?app_id={app_id}&app_code={app_code}&countryfocus=BRA&country=BRA&street=AVENIDA VEREADOR EDENITES DA SILVA VIANA&housenumber=244&city=São Francisco de Itabapoana&district=CENTRO&postalcode=28230000&state=RJ Response_1: -21.47765, -41.10775

//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////

Request_2: https://geocoder.api.here.com/6.2/geocode.json?app_id={app_id}&app_code={app_code}&countryfocus=BRA&country=BRA&street=AVENIDA VEREADOR EDENITES DA SILVA VIANA&housenumber=160&city=São Francisco de Itabapoana&district=CENTRO&postalcode=28230000&state=RJ Response_2: -21.47765, -41.10775

help, please

Upvotes: 0

Views: 43

Answers (1)

user3505695
user3505695

Reputation:

Reason behind same location position in response is because the matchLevel in your request is street so it doesn't matter if you will change the house number in the request, the position will point to the street address every time until it will find a housenumber/name.

"Result": [
                {
                    "Relevance": 0.9,
                    "MatchLevel": "street",----> street is matched in response
                    "MatchQuality": {
                        "Country": 1.0,
                        "City": 1.0,
                        "Street": [
                            0.9
                        ]
                    },

In the match quality there is no where it says hosuenumber like below response from the example-

"Result": [
      {
        "Relevance": 1,
        "MatchLevel": "houseNumber",
        "MatchQuality": {
          "Country": 1,
          "City": 1,
          "Street": [
            0.85
          ],
          "HouseNumber": 1
        },

To resolve this please enter the valid housenumber which matches this search. https://developer.here.com/documentation/examples/rest/geocoder/latitude-longitude-by-partial-address

Upvotes: 1

Related Questions