Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
jblomqvist
Specialist
Specialist

Is there a quick way to get co-ordinates (X and Y) of cities if you just have city names?

Hi all,

Is there a quick way to get co-ordinates (X and Y) of cities if you just have city names?

E.g. I have a table with a list of city names. And I would like to get the X and Y co-ordinates of those cities without having to manually look for it and populate it in some spreadsheet.

5 Replies
Anonymous
Not applicable

Hi John,

Yes this is possible, but you need to have geolocation service providing you with a data file that will contain the needed elements such:

City, Country, Longitude, Latitude, .....

Check on qlikmarket, google, openstreetmap, maxmind, geonames....

Best

Maurice

HirisH_V7
Master
Master

check this,

Short Review of Geographic Mapping Options in QlikView

-Hirish

HirisH
“Aspire to Inspire before we Expire!”
simondachstr
Luminary Alumni
Luminary Alumni

X, Y? Map locations are expressed in polar rather than Cartesian coordinates

Kushal_Chawda

see this

Table:
LOAD
City
FROM Table;


let noRows = NoOfRows('Table')-1;

for i=0 to $(noRows)

let b = peek('City',$(i),'Table');

GeocodeResponse:
LOAD
status,
'$(b)' as CustomerCity,
(
[result/geometry/location/lat]) as latitude,
(
[result/geometry/location/lng]) as longitude
FROM [http://maps.googleapis.com/maps/api/geocode/xml?address=$(b)&sensor=false] (XmlSimple, Table is [GeocodeResponse]);
next i;