Here geocode api gives double results

44 views Asked by At

Some API geocode queries return double results when this is not warranted by the real data. It will return 2 results with slightly different latitude and longitude and different LocationId's. This makes it difficult if not impossible to decern which one is the correct result.

Example:

https://geocoder.ls.hereapi.com/6.2/geocode.json?apiKey=8888&city=Zutphen&country=NL

Returns:

{
   "Response":{..
      },
      "View":[
         {
            "Result":[
               {
                  "Relevance":1.0,
                  "MatchLevel":"city",
                  "MatchQuality":{
                     "City":1.0
                  },
                  "Location":{
                     **"LocationId":"here:cm:namedplace:23055957",**
                     "LocationType":"point",
                     **"DisplayPosition":{
                        "Latitude":52.1402,
                        "Longitude":6.19152**
                     },
                   ...
                     },
                     "Address":{
                        "Label":"Zutphen, Gelderland, Nederland",
                        "Country":"NLD",
                        "State":"Gelderland",
                        "County":"Zutphen",
                        "City":"Zutphen",
                        "PostalCode":"7201",
                        "AdditionalData":[
                           {
                              "value":"Nederland",
                              "key":"CountryName"
                           },
                           {
                              "value":"Gelderland",
                              "key":"StateName"
                           },
                           {
                              "value":"Zutphen",
                              "key":"CountyName"
                           }
                        ]
                     }
                  }
               },
               {
                  "Relevance":1.0,
                  "MatchLevel":"city",
                  "MatchQuality":{
                     "City":1.0
                  },
                  "Location":{
                     **"LocationId":"here:cm:namedplace:20201443",**
                     "LocationType":"point",
                     **"DisplayPosition":{
                        "Latitude":52.13764,
                        "Longitude":6.20777**
                     },
                     ...
            ],
            "ViewId":0
         }
      ]
   }
}
0

There are 0 answers