Early Access: The content on this website is provided for informational purposes only in connection with pre-General Availability Qlik Products.
All content is subject to change and is provided without warranty.
Skip to main content

Dataset

Data sources that can be used with operations in the Qlik GeoOperations extension.

CSV

Text files with table data, optionally with geometries. Instead of geometries also names of locations may be specified. All fields will be loaded as strings.
Parameters for CSV
ParameterTypeUseDescription
urlstring The URL of the file containing the data. URLs with file-protocol are normally not allowed. In a local customer installation it may be allowed. When login is required for accessing the URL, user and password can be specified in the URL like this: http://username:password@hostname/ (note that passing login information like this is not possible in IE9).
keyFieldstringdefault: The name of the field that contains identities for each geometry. If you leave the field empty a key field will be generated.
geometryFieldstringdefault: Name of the geometry field if any. As an alternative to a geometry a column with names of well known names of points or areas may be specified, "Geometry Type" below. If point data is in two fields then specify name of latitude field comma name of longitude field.
geometryTypestringdefault:POINT Type of geometry in the Geometry Field. Allowed values are
  • Point - a point geometry, i.e. "[longitude,latitude]"
  • PointLatLon - one field with latitudes and one with longitudes
  • Line - a line geometry, i.e. "[[longitude,latitude],[longitude,latitude],...]"
  • Polygon - a polygon geometry, i.e. an array of closed lines or array of array of closed lines in case of multi-polygons
  • LocationNamedPoint - a name of a geographic point such as a city
  • LocationNamedArea - a name of a geographic area such as a country
  • WKT - a geometry on WKT format, supports POINT, LINESTRING, MULTILINESTRING, POLYGON and MULTIPOLYGON, see https://en.wikipedia.org/wiki/Well-known_text_representation_of_geometry
In case of named points or areas, the geometry is looked up in the location service and a column for the geometry is added. Also columns for country, type, administrative areas are added as in the Standard areas and Points dataset.
suffixstring For advanced user. The specified string is appended to all IDs. This is a convenient way to specify more information to server based location services such as country code or type. The alternative is to append the extra data when loading the table into Qlik. With the following suffix all items are specified to be cities in Sweden:
,SE:city
See the Geometry Service Specification for more information on syntax to use.
headerstringdefault: The names of the columns separated by comma. If blank, the first row is supposed to contain the header.
fieldSeparatorstringdefault:TAB Character that separates fields. In addition to ordinary characters the key words TAB, NEWLINE, COMMA and SEMICOLON are allowed.
recordSeparatorstringdefault:NEWLINE Character that separates lines. In addition to ordinary characters the key words TAB, NEWLINE, COMMA and SEMICOLON are allowed.
encodingstringdefault:UTF-8 Character set for the file. Same values allowed as in Java.
stringQuotesstringdefault: Character that may be used for quoting strings. Field and record separators inside the quotes will not be parsed as such. The quotes will be removed in the imported data. In addition to ordinary characters the key words QUOTE("), DOUBLEQUOTE(") and SINGLEQUOTE(') are allowed.
crsstringdefault:Auto CRS of the data to load. The data will be projected from this CRS to WGS84 (EPSG:4326) before being loaded into the app.

If set to Auto then EPSG:4326 (WGS84) is used.

GEOFILE

Loads different kinds of geographical file formats like GeoJSON and Shape.

This example loads a GeoJson file via the Simplify operation:

Load * Extension GeoOperations.ScriptEval(' SELECT nuts.NUTS_ID as NUTS_ID, Simplified_nuts_Geometry FROM Simplify() DATASOURCE nuts GEOFILE url="https://datahub.io/core/geo-nuts-administrative-boundaries/r/nuts_rg_60m_2013_lvl_1.geojson"');
Parameters for GEOFILE
ParameterTypeUseDescription
urlstring The URL of the file containing the data. URLs with file-protocol are not allowed. When login is required for accessing the URL, user and password can be specified in the URL like this: http://username:password@hostname/ (note that passing login information like this is not possible in IE9).
keyFieldstringdefault: The name of the field that contains identities for each geometry. If you leave the field empty a key field will be generated.
typestringdefault:Auto The type of file. Allowed values are:
  • Auto - Tries to detect the file type from the name of the file.
  • GeoJSON - The GeoJSON format as specified by geojson.org.
  • GML - For reading GML files or connecting to WFS services. Reads featureCollection files and makes one row of each featureMember element.
  • Shape - A zip file with at least a shp and a dbf file for the ESRI shape file format. It is important that the zip file is created with the same character encoding as the files it contain.
  • ESRIJson - JSON as returned by ESRI ArcGIS Server (see ESRI doc of format). This makes it possible to connect to ArcGIS and import data from services it has published.
  • DXF - For reading geometries from an AutoCAD DXF file. A limited set of entity types for points and lines are supported: POINT, TEXT, MTEXT, ARC, CIRCLE, LINE, POLYLINE, LWPOLYLINE, SPLINE, MLINE
encodingstringdefault: For some formats (like ESRI Shape) the character encoding is not defined in the format. This gives a way to provide this information. For most formats this property is ignored. Uses the Java character encodings available.
expectedGeomTypestringdefault:Auto Only a single geometric type is loaded at a time. If there are multiple types in the data, use this property to set which type is loaded. For formats that does not support multiple types, this parameter is ignored.
  • Auto - Tries to detect type automatically.
  • Point - Looks for Points in the specified file.
  • Line - Looks for Lines in the specified file.
  • Polygon - Looks for Polygons in the specified file.
crsstringdefault:Auto Coordinate reference System (CRS) of the data to load. The data will be projected from this CRS to WGS84 (EPSG:4326) before being loaded into the app.

If set to Auto or if empty it will try to parse it from the file. If no CRS is found in the file, then EPSG:4326 (WGS84) is used. Note that setting this to a CRS overrides the information in the file and should only be done for files lacking such information or where it is known that it is wrong. Files with data with several CRSs are not supported.

INTABLE

A table that is passed as input to the Extension function can be declared to specify how it should be interpreted. If it is not declared, key field and geometry field can in many cases be automatically detected based on contents. It is however recommended to declare tables so that the iterpretation does not change after a reload with new data.

If the table contains names instead of geometries or latitude and longitude columns, it must be declared.

If the table is not declared it will count as the first table for default datasets in operations. If it is declared, it will be counted in the order it is declared.

Normally the Sense geometry format is used but WKT format (https://en.wikipedia.org/wiki/Well-known_text_representation_of_geometry) is also supported. This makes it possible to read geographic data from a database using one of the usual database connectors and thet convert the geometries to Sense geometries using the Load operation. Note that when geometries are read from the database a function that returns the column in WKT format should be applied. The standard SQL function is called ST_AsText() but some databases have their own function.

Only one of the parameters that specify the location field may be used at a time, except latitudeField and longitudeField which always should be defined in pairs.

Example with latitude and longitude fields:

MyCities: LOAD * inline " cid;lat;long 1;57.7;12 2;45.42;-75.70 " (delimiter is ';'); Load * Extension GeoOperations.ScriptEval(' TravelAreas(costValue="10",costUnit="minutes") DATASOURCE cities INTABLE keyField="cid", latitudeField="lat", longitudeField="long"', MyCities);
Example where the data contains named locations and because of that needs to declare the namedAreaField parameter:
MyCountries: LOAD * inline " cid;Country 1;US 2;CA " (delimiter is ';'); Load * Extension GeoOperations.ScriptEval(' Simplify() DATASOURCE countries INTABLE keyField="Country", namedAreaField="Country"', MyCountries{Country});
Parameters for INTABLE
ParameterTypeUseDescription
keyFieldstring optional The name of a field that contains unique identities for each row. If not specified a key column named _autoIndex_ will be added with unique values for each row.
pointFieldstring optional Field containing point data in Sense point format, "[longitude, latitude]". Also WKT point data ("POINT(...)") is supported.
lineFieldstring optional Field containing line data in Sense line format, like "[[longitude,latitude],[longitude,latitude],...]". Also WKT line data ("LINESTRING(...)" or "MULTILINESTRING(...)") is supported.
polygonFieldstring optional Field containing line data in Sense polygon format, i.e. an array of closed lines or array of array of closed lines in case of multi-polygons. Also WKT polygon data ("POLYGON(...)" or "MULTIPOLYGON(...)") is supported.
latitudeFieldstring optional Field containing latitude values.
longitudeFieldstring optional Field containing longitude values.
namedPointFieldstring optional Field containing names of geographic features that are looked up in the location database. The names will be represented with points.
namedAreaFieldstring optional Field containing names of geographic features that are looked up in the location database. The names will be represented with polygons. Not all names in the location database have associated polygons.

LOCATIONSERVICE

Points and areas that are available in a Qlik GeoAnalytics Server location service. Type or country must be specified.

The fields in tables loaded from the location service are:

  • LocationDbId - unique id for each entity
  • LocationPoint/LocationArea - the geometry of the entity
  • CountryIso2 - the 2 letter country code
  • Adm1Code - nation specific code of first order administrative area
  • Adm2Code - nation specific code of second order administrative area
  • LocationDbType - see the Geometry Service Specification for more info on the types

This example loads the states in US:

MyAirports: Load * Extension GeoOperations.ScriptEval(' Load() DATASOURCE states LOCATIONSERVICE geometry="AREA", type="STATE", country="us" ');
Parameters for LOCATIONSERVICE
ParameterTypeUseDescription
geometrystringdefault:Area Chose to access Points or Areas.
typestringdefault:Country Type of data that the names represents such as countries, administrative areas, postal codes etc. The following simplified type names can be used (case insensitive) in the native types in the location database:
  • CONTINENT - continent name
  • COUNTRY - country name
  • COUNTRYISO2 - ISO 3166-1 alpha-2 code
  • COUNTRYISO3 - ISO 3166-1 alpha-2 code
  • ADMIN1 - first order administrative division
  • STATE - alias for ADMIN1
  • ADMIN2 - second order administrative division
  • ADMIN3 - third order administrative division
  • ADMIN4 - fourth order administrative division
  • POSTALCODE - postal code
  • ZIP - alias for POSTALCODE
  • CITY - city name
  • AIRPORTIATA - airport IATA code
  • AIRPORTICAO - airport ICAO code
See the Geometry Service Specification for more information on the detailed types.
countrystringdefault: Country code (2 or 3 letters) for the country to access. Several countries may be specified, separated by comma. The default value means not restricted to a country.

Did this page help you?

If you find any issues with this page or its content – a typo, a missing step, or a technical error – let us know how we can improve!