Location Services

Location Services

Version: 5.8.1, Date: 2017-05-17

Contents

Introduction

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 default point service is available at:

i:///pointgeom/default

The default area service is available at:

i:///areageom/default

The format that a name should be specified at is:

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

Where:

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:

Type groupNameDescriptionUseful types
A*Administrative areacountries, states, regions etc
  • APCLI - country, 2-letter code, 3-letter 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 placecity, village etc
  • PPPLC - capital
  • PPPLG - seat of government
  • PPPLA - seat of first order division
XCISO22 character ISO country code
XCISO33 character ISO country code
XPCPostal codefull or aggregated postal area
XIATAIATA Airport code
XICAOICAO Airport code
XFAACFAAC Airport code
L*Land usecontinents, parks, areas etc.
  • LCONT - continent
H*Hydrographic featurelake, canal etc.

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

Point Geometry Files

A GeoJSON file can also be used as a geometry service where names are looked up from an attribute in the file. Any GeoJSON file with point data can be used as a point geometry service. Just specify the url and name of the attribute that should be matched with the data. Note! key attribute names are case sensitive.

Area Geometry Files

A GeoJSON file can also be used as a geometry service where names are looked up from an attribute in the file. Any GeoJSON file with polygonal data can be used as an area geometry service. Just specify the url and name of the attribute that should be matched with the data. Note! key attribute names are case sensitive.

The following files are provided by Qlik:

URLContainsKey attributes
i://location/areas/countries.geojsonCountries of the world
  • ISO_A2 - 2 letter iso country code
  • ISO_A3 - 3 letter iso country code
  • ISO_N3 - 2 digits iso country code
  • NAME - country name
i://location/areas/states.geojsonStates for of the world, including the countries USA, Canada, Brazil and Australia
  • CODE - 2 letter state code followed by 2 letter iso country code, separated by comma, i.e. "TX,US"
  • NAME - state name
i://location/areas/se_kommuner.geojsonSwedish kommuner
  • KNKOD - 4 digits code (kommunkod)
  • KNNAMN - name