Location service
A location service translates from a name to coordinates. There are different types of geometry services, either file based of server based. Also there are some provided by Qlik by default.
Location server
The default location service is a server based service with a great number of points and areas for various named features. Typically for countries, states, other regions, cities, postal codes etc. Where there are well established codes, for instance for countries, both the code or the name can be used. There are also names in multiple languages for many features.
The format that a name should be specified at is:
name[[[,admin2code],admin1code],countrycode][:type]
Where:
- name - the name of the feature that should be looked up
- type - the type of name or type followed by * to match several types, see below for available types
- admin2code - the region to find the name in
- admin1code - the first order division, such as state, to find the name in
- countrycode - the two or three letter ISO country code to find the name in
The type may as an alternative be specified directly after name instead of last if that is more convenient.
Type names are ordered hierarchically and a star (*) can be used last in the type to match multiple types. Here is a short description of available types:
Simple type | Detailed type | Description | Areas |
---|---|---|---|
CONTINENT | LCONT | continent name | None |
COUNTRY | APCL* | country name | All |
COUNTRYISO2 | XCISO2 | ISO 31661 alpha2 code | All |
COUNTRYISO3 | XCISO3 | ISO 31661 alpha2 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 an 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 reply status "ambiguous" (2).
The following is the city Hamburg in Germany:
Hamburg,DE
and this is Hamburg in Sweden:
Hamburg,SE
If you actually wanted 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 instance in USA there are many Hamburg. To get the one in Arkansas specify:
Hamburg,AR,US