question

BalasahebMolawade-3927 avatar image
0 Votes"
BalasahebMolawade-3927 asked

Batch geocode issue

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
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

1 Answer

rbrundritt avatar image
2 Votes"
rbrundritt answered

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>

5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.