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 Skip to complementary content

GeoAnalytics example: Simplify

You can load files containing geographic data or shapes into Qlik Sense. If your shape files are large or complex, however, they may be too detailed to make an effective map visualization in Qlik Sense. Large or complex datasets may also take longer to load in a GeoAnalytics map. The Simplify operation can be used to reduce the complexity of your data. Simplify returns a table with a field that contains the simplified geodata for your maps, smoothing and simplifying how your data appears in GeoAnalytics layers. This enables you to create smoother layers in your GeoAnalytics maps when high levels of detail are not needed and potentially solve slow loading issues with heavily detailed geodata.

This example will show you how to use the Simplify operation to process and load geodata into a GeoAnalytics map.

Example

We have a shape file containing the Canadian federal electoral districts that we want to use to create a GeoAnalytics map displaying all the districts. When the shape file is loaded into a GeoAnalytics map in Qlik Sense, the visualization is slow to load and there are a lot of fine details in the lines that are not necessary for showing a map of all the districts, as the comparison below illustrates.

Comparison of area layers between the simplified area layer (left) and original shape data area layer (right)

Example comparing a simplified area map and an original shape data map, which has far more complex border lines and details

How then can we improve the usability of our map while preserving the shapes from our geodata?

To solve this problem, we are going to load the shapes of the Canadian federal electoral districts using Simplify to process the shape file and create more usable shape data for a map visualization.

Map of Canadian federal electoral districts

Map of Canadian federal electoral districts, with borders that are simplified to reduce processing time but still accurate

This example creates a map with the Canadian federal electoral districts as an area layer. This example also adds custom info bubbles to display the each district's name when the cursor passes over it.

Dataset

The shape file used in this example, gfed000b11a_e.zip, is available from Statistics Canada. If you have installed GeoAnalytics Plus, you can store the file locally. Otherwise you can use its URL performing the Simplify operation using the GeoAnalytics Connector.

Instructions

After you create a new app in Qlik Sense, you can begin creating your map. To make the example map, you must complete the following tasks:

  1. Add the GeoAnalytics Connector.
  2. Load the dataset using Simplify.
  3. Add the map layer.
  4. Area layer

1. Adding the GeoAnalytics Connector

The first step is to create a GeoAnalytics Connector with which you will use to simplify the shape files. If you have an existing GeoAnalytics Connector, you can use it with this example. Otherwise you will first add a new section in Data load editor and then add a connector.

  1. Open Data load editor.
  2. Click Create new section.
  3. Type GeoData.
  4. Click Create new connectionQlik GeoAnalytics Connector.
  5. In the GeoAnalytics server drop-down, select your server.

  6. After Connection name, enter GeoSimplify.
  7. Click Save.

2. Loading the dataset using Simplify

Next, you use the Simplify operation in your connector to load the dataset. You specify the type of dataset, the location, the file type, the expected geometry in the file, and the coordinate reference system (CRS).

When Simplify returns the new simplified table along with the table for the existing dataset, you select the fields you require: Dataset_Simplified_Geometry, the new simplified geography field, FEDNAME, the list of district names, and _autoIndex_, a field created during the Simplify operation that serves as a key field so the simplified geometry has associations to the information in the original dataset.

  1. In the Data connections pane, under GeoSimplify, click Data Selection.
  2. After Operation, select Simplify.
  3. After Type, select File based geo dataset.
  4. After URL, do one of the following depending on if you are using GeoAnalytics Plus:

    • If you have GeoAnalytics Plus, type your file path to gfed000b11a_e.zip in the following format: file:///<file path>.

      For example, file:///C:/Share/gfed000b11a_e.zip.

    • If you are not using GeoAnalytics Connector Plus, type the following URL: http://www12.statcan.gc.ca/census-recensement/2011/geo/bound-limit/files-fichiers/gfed000b11a_e.zip.
  5. After File Type, select ESRI shape file.
  6. After Expected Geometry Type, select Polygon.
  7. After CRS, enter EPSG:4269.
  8. Click Next.
  9. From the table Dataset_Simplified, select the fields Dataset_Simplified_Geometry and _autoIndex_.
  10. From the table Dataset, select the field FEDNAME and _autoIndex_.
  11. Click Insert script.
  12. Click Save.
  13. Click Load data.

3. Adding the GeoAnalytics map

The next step is to add a GeoAnalytics map to your sheet.

  1. In sheet view, click Edit Edit sheet in the toolbar.
  2. Click Extension puzzle piece icon to open extensions.
  3. Drag and drop GeoAnalytics Map into your sheet.

4. Adding the area layer

Finally, you add an area layer to the sheet that uses the simplified shapes field and configure it to use Dataset_Simplified_Geometry as a dimension. In addition, you add a custom info bubble that displays the federal electoral district name.

  1. In sheet view, click Edit Edit sheet in the toolbar.
  2. Click Extension puzzle piece icon to open extensions.
  3. Click Add dimension and select Dataset_Simplified_Geometry.
  4. Click Location ID.
  5. Click Add measure and type FEDNAME.
  6. Click Location Options.
  7. In the Location Source drop-down, select Dimension.
  8. Click Appearance.
  9. Click Legend.
  10. Set Color Legend to Custom.
  11. Clear Show Colors.
  12. Click Colors.
  13. Set Colors to Custom.
  14. Select By dimension.
  15. Select 100 colors.
  16. Click Info Bubble.
  17. Set Info Bubble to Custom.
  18. As the expression, type FEDNAME.
  19. Click Edit Done.

Result

You now have a more responsive map containing an area layer of the Canadian federal electoral districts.

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!