Qlik Community

QlikView Documents

Documents for QlikView related information.

Address2Coord.xlsm

jmvilaplanap
Valued Contributor

Address2Coord.xlsm

Hi All

This is a Excel Macro to obtain GPS coordinates from addresses to use it in map objects. You can configure it to adapt it to your data model addresses.

I hope this will be useful for anyone

Regards

Attachments
Comments
falgunip
New Contributor III

helpful information

0 Likes
Partner
Partner

You could also embed this logic directly in the load script and write a loop to iterate through the address inputs, ex.

LET v_Address = '1600 Pennsylvania Ave NW';

AddressCoordinates:

LOAD

'$(v_Address)' as [Address Lookup],

[result/formatted_address] as [Formatted Address],

[result/geometry/location/lat] as [Latitude],

[result/geometry/location/lng] as [Longitude]

FROM

[http://maps.googleapis.com/maps/api/geocode/xml?&address=$(v_Address)&sensor=false] (XmlSimple, Table is [GeocodeResponse]);

jmvilaplanap
Valued Contributor

Yes, but remember you have only 2.000 petitions per day. If you have more or you refresh your data maybe you don't have enough.

And from time to time is not easy "find" the correct address and is necessary tor write it in another way, for example, if google can't find "1600 Pennsylvania Ave NW" you can try with "1600 Pennsylvania Avenue NW" (in a column of this excel you have the accuracy of the coordinates)

Anyway, thanks msteedle for your observation.

0 Likes
Version history
Revision #:
1 of 1
Last update:
‎2017-07-04 05:52 AM
Updated by: