Location service

Introduction

A location service automatically translates a supplied name to geographic coordinates. There are multiple location services available to useQlikView, both local and remote. Qlik provides access to some by default.

Using a Location Server

The default location service is a server-based service with a large database of locations and geographic features: countries, states, cities, other administrative regions, with postal codes, etc. Both official codes and full names can be used to query the service, and there are names in multiple languages for many geographic features.

The format that a name should be specified as is:

name[[[,admin2code],admin1code],countrycode][:type]

Which contains the following arguments:

  • name - the name of the geographic feature that is being queried.
  • type - the type of name, with optional wildcard character (*) to match against several types. The table below contains the available types.
  • admin2code - the administrative region to search for the name within.
  • admin1code - the first-order division (e.g. state), to search for the name within.
  • countrycode - the two- or three-letter ISO country code to search for the name within.

The type can also be specified directly after name instead of at the end of the query. Type names are ordered hierarchically, and a wildcard (*) can be used after the type to check against multiple types.

Available types in GeoAnalytics for QlikView
Simple type Detailed type Description Areas
CONTINENT LCONT continent name None
COUNTRY ­ APCL* country name All
COUNTRYISO2 XCISO2 ISO 3166­1 alpha­2 code All
COUNTRYISO3 XCISO3 ISO 3166­1 alpha­2 code All
ADMIN1 ­ AADM1 first order administrative division Some (almost all)
STATE ­   alias for ADMIN1  
ADMIN2 ­ AADM2 second order administrative division Some
ADMIN3 ­ AADM3 third order administrative division Some
ADMIN4 ­ AADM4 fourth order administrative division  
POSTALCODE ­ XPC postal code Some
ZIP ­   alias for POSTALCODE Some
CITY ­ P* city name, to only get a specific type of cities use:PPPLC – capitalPPPLG - seat of governmentPPPLA - seat of first order division None
AIRPORTIATA ­ XIATA airport IATA code None
AIRPORTICAO XICAO airport ICAO code None

There is a priority associated with each entry. When a name matches multiple entries the name with the highest priority is chosen. When there are several matching items with the same highest priority, this is indicated with a reply status of ambiguous.

The following input will find the city Hamburg in Germany:

Hamburg,DE

And this input will find Hamburg in Sweden:

Hamburg,SE

If you want the first-order administrative area in Germany named Hamburg, you also need to specify a type:

Hamburg,DE:AADM1

You can also specify multiple areas when needed. For example, in the USA there are many cities named Hamburg. To get the one in Arkansas, you will need to specify in your query:

Hamburg,AR,US

Did this information help you?

Thanks for letting us know. Is there anything you'd like to tell us about this topic?

Can you tell us why it did not help you and how we can improve it?