Skip to main content
Announcements
Join us at Qlik Connect for 3 magical days of learning, networking,and inspiration! REGISTER TODAY and save!
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

How to get longitude and latitude points

Hi All,

I want to get the longitude and latitude points of different addresses in different towns in US. the data is dynamic so I dont really know which address will come next in data. Can someone please guide me how to get such data for my Qlikview reports

Regards

Arif

8 Replies
a_mullick
Creator III
Creator III

Hi,

You need to get yourself a data set with latitude and longitide that will associate with a field that you store in you main data source, in your case it may be zip code. That way whenever you add a new address, as long as the zip code is valid you should be able to derive the latitide and longitude. There are free data sets available to download, which you can search for. This is an example, although I have not tried it so can't comment on whether it is suitable or not.

Free Zip Code Latitude and Longitude Database

Thanks,

Azam

rbecher
MVP
MVP

Hi Syed,

you can ask Open Street Maps for geocoding for free (see attached simple example).

- Ralf

Astrato.io Head of R&D
fred_s
Partner - Creator III
Partner - Creator III

Hi Syed,

You could use the US.ZIP on GeoNames

Not applicable
Author

Hi Ralf,

Can you please explain a little bit how can i get the long and lat codes for my addresses? should I send an email to them? Is there anyway for me to make it dynamic? Do I have to make a new request for every new address that I get in the database?

Syed

rbecher
MVP
MVP

You call this URL (web service) for each address with URI encoding:

In this example the address query (q parameter) is: 800 Ocean Drive, Miami Beach, USA

http://nominatim.openstreetmap.org/search?q=800%20Ocean%20Drive,%20Miami%20Beach,%20USA&format=xml

Then you will get an xml formated record as result where you can pick the fields lat/lon:

<searchresults timestamp="Thu, 05 Dec 13 19:36:35 +0000" attribution="Data © OpenStreetMap contributors, ODbL 1.0. http://www.openstreetmap.org/copyright" querystring="800 Ocean Drive, Miami Beach, USA" polygon="false" exclude_place_ids="7215501870" more_url="http://nominatim.openstreetmap.org/search?format=xml&exclude_place_ids=7215501870&accept-language=de..."><place place_id="7215501870" place_rank="30" boundingbox="25.777999,25.778099,-80.131292,-80.131192" lat="25.778049" lon="-80.131242" display_name="800, Ocean Drive, Miami Beach, Miami-Dade County, Florida, 33139, Vereinigte Staaten von Amerika" class="place" type="house" importance="1.001"/></searchresults>

Astrato.io Head of R&D
Not applicable
Author

Hi Fred/Azam,

I have discussed this with my customer and the requirement is the exact street address and not just the zip code. He wants this to be an automatic process so I am looking for an API that can return the goecodes if we pass it the address

Regards

Syed

a_mullick
Creator III
Creator III

I've not tried that approach, but doing a Google search for:

api to get latitude and longitude of an address

reutrns REST and javascript apis, some of which may suit your needs.

Azam

jenskrueger
Contributor III
Contributor III

A very good solution, works fine, thank you.

Jens