Spatial index
Spatial index generates a spatial index for a dataset so that it can be used with the Auto select visible feature in map charts so that field selections are updated based on the data displayed in map charts. For more information, see Setting the zoom and selection behavior for maps.
Spatial index returns the following fields:
-
<dataset key field>: A key field linking the values from SpatialIndex with the source field from the dataset.
-
SpatialIndex: Contains grid coordinates for the items in the key field.
-
SpatialIndexLevel<num>: Contains grid coordinates for the items in the key field for use with Auto select visible for each level. A field is created for each of the levels set in Number of levels.
-
All fields except the key field from dataset are prefixed with the dataset name.
If you plan to have multiple spatial indexes, you must rename the fields created by Spatial index. For example:
Do the following:
-
Under Data connections, click
on your Qlik GeoOperations connection.
-
Under Operation, select Spatial Index.
-
Under Operation, optionally adjust the parameters.
-
Grid size (degrees): The height (in degrees) of an individual spatial index cell at the most detailed level. An appropriate value is the side length of the map view that users commonly zoom into.
The default value is 0.04.
-
Grid width / height ratio: The ratio used to determine the shape of grid cells used for spatial indexing. The formula for the optimal width/height ratio is 1/cos(latitude), for example 1 at the equator, 1.15 at latitude ±30 deg and 2 at latitude ±60 deg.
The default value is 1.5.
-
Number of levels: The number of spatial index levels to be generated. Each level has cells with side lengths scaled by the level factor compared to the level below.
The default value is 6.
-
Level factor: The factor that the spatial index cell dimensions should be multiplied by for each level.
The default value is 4.
-
-
Under Dataset 1, select the type of data source to use in the operation and its parameters.
The data types and parameters are the same as those in the Load operation. For information on each of the dataset parameters, see:
You must specify a key field.
-
Under Tables, select the table to load.
-
Under Fields, select the fields to load.
-
Click Insert script.