Batch geocode issue

Balasaheb Molawade 136 Reputation points
2021-06-30T17:59:06.713+00:00

Hi,

We have used the batch geocoding available in the below link to geocode a large number of addresses.

https://blogs.bing.com/maps/2010/08/31/batch-geocoding-and-batch-reverse-geocoding-with-bing-maps/

We are not getting the geo-coordinate for some addresses. We have given one example below but there are thousands of records for which we are facing the same issue.

Here is the sample address: Via Nobili Leopoldo, 14 ALBINEA Catanzaro Emilia Romagna 42020 Italy

We generate the following geocode request

<GeocodeFeed><GeocodeEntity Id='269d366c-e1d4-eb11-bacc-000d3a3670fd' xmlns='http://schemas.microsoft.com/search/local/2010/5/geocode'>
<GeocodeRequest Culture="it-it">
<Address
AddressLine="Via Nobili Leopoldo, 14" District="Reggio Emilia" Locality="ALBINEA" AdminDistrict="Emilia Romagna" CountryRegion="Italy" PostalCode="42020" FormattedAddress="Via Nobili Leopoldo, 14 Reggio Emilia ALBINEA Emilia Romagna 42020 Italy"/>
</GeocodeRequest>
</GeocodeEntity>
</GeocodeFeed>

We got the below geocode response in that we are not getting geo-coordinate.

{<?xml version="1.0" encoding="utf-8"?><GeocodeFeed xmlns="http://schemas.microsoft.com/search/local/2010/5/geocode" ><GeocodeEntity Id="269d366c-e1d4-eb11-bacc-000d3a3670fd" xmlns="http://schemas.microsoft.com/search/local/2010/5/geocode"><GeocodeRequest Culture="it-it"><Address AddressLine="Via Nobili Leopoldo, 14" AdminDistrict="Emilia Romagna" CountryRegion="Italy" Locality="ALBINEA" PostalCode="42020" /></GeocodeRequest><GeocodeResponse DisplayName="Via Leopoldo Nobili 14, 42020 Albinea" EntityType="Address" Confidence="High" StatusCode="Success"><Address AddressLine="Via Leopoldo Nobili 14" AdminDistrict="Emilia Romagna" CountryRegion="Italia" District="Reggio nell'Emilia" FormattedAddress="Via Leopoldo Nobili 14, 42020 Albinea" Locality="Albinea" PostalCode="42020" /></GeocodeResponse><DataQuality feedAlias="geofeed1" /></GeocodeEntity></GeocodeFeed>}

We have noticed one thing when we remove AddressLine then we got geo-coordinate but it’s not accurate.

When we used geocoding REST service to geocode the address then we got the correct geo-coordinate. We have used this Bing URL to get the latitude and longitude: http://dev.virtualearth.net/REST/v1/Locations

Can you please check what is the issue with the batch geocoding.

Waiting for your reply.

Thanks!

Balasaheb

Azure Maps
Azure Maps
An Azure service that provides geospatial APIs to add maps, spatial analytics, and mobility solutions to apps.
833 questions
0 comments No comments
{count} votes

Accepted answer
  1. rbrundritt 20,836 Reputation points Microsoft Employee Moderator
    2021-06-30T20:40:00.84+00:00

    If you remove the AddressLine, then the next lowest level entity in your address would be postal code.

    If you only want to pass in the single address line string "Via Nobili Leopoldo, 14 Reggio Emilia ALBINEA Emilia Romagna 42020 Italy", use the Query parameter, and don't parse out the individual parts. This will likely be the most inline with the locations service. For example:

    <GeocodeFeed><GeocodeEntity Id='269d366c-e1d4-eb11-bacc-000d3a3670fd' xmlns='http://schemas.microsoft.com/search/local/2010/5/geocode'>;;
    <GeocodeRequest Culture="it-it">
    <Address Query="Via Nobili Leopoldo, 14 Reggio Emilia ALBINEA Emilia Romagna 42020 Italy"/>
    </GeocodeRequest>
    </GeocodeEntity>
    </GeocodeFeed>

    2 people found this answer helpful.
    0 comments No comments

0 additional answers

Sort by: Most helpful

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.