0

We're trying to geocode a location in Poland, using a street, zip code and a city name, but seem to get wrong result. We're looking for: DĄBROWSKIEGO , 82-300 ELBLĄG Request:

https://geocoder.ls.hereapi.com/6.2/geocode.json?apiKey={API_KEY}&searchtext=D%C4%84BROWSKIEGO%2B,%2B82-300%2BELBL%C4%84G

Instead of a road of that name in the city of Elbląg we get a street of the same name in Poznań:

{
    "Response": {
        "MetaInfo": {
            "Timestamp": "2021-05-11T10:40:48.113+0000"
        },
        "View": [
            {
                "Result": [
                    {
                        "Relevance": 0.65,
                        "MatchLevel": "houseNumber",
                        "MatchQuality": {
                            "Street": [
                                0.5
                            ],
                            "HouseNumber": 1.0
                        },
                        "MatchType": "pointAddress",
                        "Location": {
                            "LocationId": "here:af:streetsection:nKjv5QtDTbhcQ-QErVaJvA:CgcIBCDCwO9pEAEaAzMwMA",
                            "LocationType": "point",
                            "DisplayPosition": {
                                "Latitude": 52.42663,
                                "Longitude": 16.85675
                            },
                            "NavigationPosition": [
                                {
                                    "Latitude": 52.42678,
                                    "Longitude": 16.85687
                                }
                            ],
                            "MapView": {
                                "TopLeft": {
                                    "Latitude": 52.42753,
                                    "Longitude": 16.85528
                                },
                                "BottomRight": {
                                    "Latitude": 52.42573,
                                    "Longitude": 16.85822
                                }
                            },
                            "Address": {
                                "Label": "ulica gen. Jana H. Dąbrowskiego 300, 60-406 Poznań, Polska",
                                "Country": "POL",
                                "State": "Woj. Wielkopolskie",
                                "County": "Poznań",
                                "City": "Poznań",
                                "District": "Poznań",
                                "Subdistrict": "Jeżyce",
                                "Street": "ulica gen. Jana H. Dąbrowskiego",
                                "HouseNumber": "300",
                                "PostalCode": "60-406",
                                "AdditionalData": [
                                    {
                                        "value": "Polska",
                                        "key": "CountryName"
                                    },
                                    {
                                        "value": "Woj. Wielkopolskie",
                                        "key": "StateName"
                                    },
                                    {
                                        "value": "Poznań",
                                        "key": "CountyName"
                                    }
                                ]
                            }
                        }
                    }
                ],
                "ViewId": 0
            }
        ]
    }
}

Trying to use newer api gives the same results:

https://geocode.search.hereapi.com/v1/geocode?apiKey={API_KEY}&q=D%C4%84BROWSKIEGO%2B,%2B82-300%2BELBL%C4%84G
{
    "items": [
        {
            "title": "ulica gen. Jana H. Dąbrowskiego 300, 60-406 Poznań, Polska",
            "id": "here:af:streetsection:nKjv5QtDTbhcQ-QErVaJvA:CgcIBCDCwO9pEAEaAzMwMA",
            "resultType": "houseNumber",
            "houseNumberType": "PA",
            "address": {
                "label": "ulica gen. Jana H. Dąbrowskiego 300, 60-406 Poznań, Polska",
                "countryCode": "POL",
                "countryName": "Polska",
                "state": "Woj. Wielkopolskie",
                "county": "Poznań",
                "city": "Poznań",
                "district": "Poznań",
                "subdistrict": "Jeżyce",
                "street": "ulica gen. Jana H. Dąbrowskiego",
                "postalCode": "60-406",
                "houseNumber": "300"
            },
            "position": {
                "lat": 52.42663,
                "lng": 16.85675
            },
            "access": [
                {
                    "lat": 52.42678,
                    "lng": 16.85687
                }
            ],
            "mapView": {
                "west": 16.85528,
                "south": 52.42573,
                "east": 16.85822,
                "north": 52.42753
            },
            "scoring": {
                "queryScore": 0.65,
                "fieldScore": {
                    "streets": [
                        0.5
                    ],
                    "houseNumber": 1.0
                }
            }
        }
    ]
}

Looking for a different street in the city of Elbląg gives us proper result: Łęczycka, 82-300 ELBLĄG

https://geocoder.ls.hereapi.com/6.2/geocode.json?apiKey={API_KEY}&searchtext=%C5%81%C4%99czycka%2B,%2B82-300%2BELBL%C4%84G
{
    "Response": {
        "MetaInfo": {
            "Timestamp": "2021-05-11T10:43:15.578+0000"
        },
        "View": [
            {
                "Result": [
                    {
                        "Relevance": 0.99,
                        "MatchLevel": "street",
                        "MatchQuality": {
                            "City": 1.0,
                            "Street": [
                                0.9
                            ],
                            "PostalCode": 1.0
                        },
                        "Location": {
                            "LocationId": "here:af:street:SHP1-8Tzm6jtHKMvaFxTLA",
                            "LocationType": "point",
                            "DisplayPosition": {
                                "Latitude": 54.16571,
                                "Longitude": 19.46824
                            },
                            "NavigationPosition": [
                                {
                                    "Latitude": 54.16571,
                                    "Longitude": 19.46824
                                }
                            ],
                            "MapView": {
                                "TopLeft": {
                                    "Latitude": 54.17117,
                                    "Longitude": 19.43421
                                },
                                "BottomRight": {
                                    "Latitude": 54.15544,
                                    "Longitude": 19.50485
                                }
                            },
                            "Address": {
                                "Label": "ulica Łęczycka, 82-300 Elbląg, Polska",
                                "Country": "POL",
                                "State": "Woj. Warmińsko-Mazurskie",
                                "County": "Elbląg",
                                "City": "Elbląg",
                                "District": "Elbląg",
                                "Street": "ulica Łęczycka",
                                "PostalCode": "82-300",
                                "AdditionalData": [
                                    {
                                        "value": "Polska",
                                        "key": "CountryName"
                                    },
                                    {
                                        "value": "Woj. Warmińsko-Mazurskie",
                                        "key": "StateName"
                                    },
                                    {
                                        "value": "Elbląg",
                                        "key": "CountyName"
                                    }
                                ]
                            }
                        }
                    }
                ],
                "ViewId": 0
            }
        ]
    }
}

Is there anything we're doing wrong when invoking the requests?

DemoBytom
  • 305
  • 1
  • 9

1 Answers1

0

Now it returns correct results:

https://geocoder.ls.hereapi.com/6.2/geocode.json?language=en-US&maxresults=20&searchtext=D%C4%84BROWSKIEGO+82-300+ELBL%C4%84G&apikey=***

Result:

{
  "Response": {
    "MetaInfo": {
      "Timestamp": "2021-07-20T12:23:56.560+0000"
    },
    "View": [
      {
        "_type": "SearchResultsViewType",
        "ViewId": 0,
        "Result": [
          {
            "Relevance": 1,
            "MatchLevel": "street",
            "MatchQuality": {
              "City": 1,
              "Street": [
                0.57
              ],
              "PostalCode": 1
            },
            "Location": {
              "LocationId": "NT_mqHTX7fWyBVgpiaYyp.VAB",
              "LocationType": "point",
              "DisplayPosition": {
                "Latitude": 54.15047,
                "Longitude": 19.45583
              },
              "NavigationPosition": [
                {
                  "Latitude": 54.15047,
                  "Longitude": 19.45583
                }
              ],
              "MapView": {
                "TopLeft": {
                  "Latitude": 54.15449,
                  "Longitude": 19.44247
                },
                "BottomRight": {
                  "Latitude": 54.15029,
                  "Longitude": 19.46051
                }
              },
              "Address": {
                "Label": "ulica gen. Jarosława Dąbrowskiego, 82-300 Elbląg, Poland",
                "Country": "POL",
                "State": "Woj. Warmińsko-Mazurskie",
                "County": "Elbląg",
                "City": "Elbląg",
                "District": "Elbląg",
                "Street": "ulica gen. Jarosława Dąbrowskiego",
                "PostalCode": "82-300",
                "AdditionalData": [
                  {
                    "value": "Poland",
                    "key": "CountryName"
                  },
                  {
                    "value": "Woj. Warmińsko-Mazurskie",
                    "key": "StateName"
                  },
                  {
                    "value": "Elbląg",
                    "key": "CountyName"
                  }
                ]
              }
            }
          }
        ]
      }
    ]
  }
}

This GS7 request https://search.hereapi.com/v1/geocode?q=D%C4%84BROWSKIEGO+82-300+ELBL%C4%84G&at=51.9206796%2C17.2954345&lang=en-US&limit=20&apikey=***

returns incorrect result - but will be fixed soon.

  • I'm testing both requests and they still return incorrect results - both still return city of Poznań, instead Elbląg. – DemoBytom Aug 11 '21 at 10:17