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 default point service is available at:
The default area service is available at:
The format that a name should be specified as is:
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.
|A*||Administrative area||Countries, states, regions, etc.||
APCLI - country, 2-letter ISO country code, 3-letter ISO country code, or name
AADM1 - state, name or code, where applicable
AADM2 - second-order division
AADM3 - third-order division
AADM4 - fourth-order division
AADM5 - fifth-order division
|P*||Populated place||Cities, towns, etc.||
PPPLC - capital
PPPLG - seat of government
PPPLA - seat of first-order division
|XCISO2||2 character ISO country code|
|XCISO3||3 character ISO country code|
|XPC||Postal code||Full or aggregated postal areas|
|XIATA||IATA Airport code|
|XICAO||ICAO Airport code|
|XFAAC||FAAC Airport code|
|L*||Land use||Continents, parks, regions, etc.||LCONT - continent|
|H*||Hydrographic feature||Lakes, rivers, canals, etc.|
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:
And this input will find Hamburg in Sweden:
If you want the first-order administrative area in Germany named Hamburg, you also need to specify a type:
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:
Using Geometry Files
The following geometry files are provided by Qlik for use with GeoAnalytics for QlikView:
|i://location/areas/countries.geojson||Countries of the world||
ISO_A2 - 2-letter ISO country code
ISO_A3 - 3-letter ISO country code
ISO_N3 - 2-digit ISO country code
NAME - country name
|i://location/areas/states.geojson||States of the world, including USA, Canada, Brazil and Australia||
CODE - 2-letter state code, followed by 2-letter ISO country code, separated by comma, e.g. "TX,US"
NAME - state name
KNKOD - 4-digit code (kommunkod)
KNNAMN - name