OpenStreetMap: Combining hierarchy and maps

Last modified by Aurelie Bertrand on 2025/07/21 11:40


Introduction

In this tutorial, we're going to find out how to create an Open Street Map and navigate on different map backgrounds.

The dataset used in the tutorial corresponds to fictitious data on the French départements. This data is contained in the Excel file "departements_regionsfr".

This entire tutorial takes place in the Studio.
We will first create a data model in which we will define a hierarchy based on regions and departments.
We will then create a background map with 2 levels corresponding to the regions and departments.
Finally, we will create an Open Street Map and configure it using the elements previously created.

Prerequisites

In order to complete this tutorial, you will need to :

  • have installed DigDash Enterprise version 2025R1 or higher;
  • be a user with the "Data Model Designer" authorization group;
  • download the Excel file "departements_regionsfr_en" and the Geosjson maps contained in Cartes_geojson.zip.

ℹ The screenshots in this tutorial were produced using the Chrome browser. There may be slight differences depending on the browser.

 

Step 1: Create and configure the data model

This tutorial assumes that you are going to import your data sources and create your charts in your personal role.

Import the data

Here we're going to import the data from the Excel file "departements_regionsfr_en" (retrieved earlier).

To do this

  1. Launch the Studio.
  2. Open the Templates tab.
  3. Click on the New template button.
  4. In the Create a new data model box, select All types in the Files section.
    ➡ The Search remote files box appears.
  5. In the Server drop-down list, select "Common Datasources."
  6. Click the Add file button.
    Search file 
  7. When the Select a local file or URL box appears, keep the default selection From your computer.
  8. Click Browse to select the "departements_regionsfr_en" file retrieved earlier.
  9. Click OK.
    ➡ The file is now saved on the DigDash server "Common Datasources" and accessible to all users.

ℹ If the document server UserDocs is selected the documents are only accessible to the user who uploaded them.

  1. In the Search remote files dialog, select "departements_regionsfr_en".
  2. Click OK.

The Excel File box appears. It offers data selection options and a preview of the data.

Preview_EN.png

The data includes a column DEP containing the department code, a column REG for the region code and a column Measure.

The elements in the first row of the table correspond to the data types in each column. We will therefore use them as column headers. For example, DEP for column 1. To do this:

  • In the Data selection section, select the First row as header checkbox .
    Data selection

We can now move on to configuring the data model: click the Next button at the bottom right to open the data model configuration window.

Create the hierarchy

The data model configuration window opens on the Columns tab. We are going to create the Region-Departement hierarchy. To do this:

  1. Select the dimension DEP, which corresponds to the department codes. Grouping is done from the most detailed to the least detailed level.
  2. In the Hierarchies section, click the + button and select Automatic grouping.
    ➡ The Group editor dialog box is displayed.
  3. In the Group field, enter the name of the hierarchy: Region-Department.
  4. In the Complete path field, select REG from the drop-down list after DEP /.
    Automatic grouping
  5. Click OK and then Finish.
  6. Enter a name for the data model : Departments, and click OK.

Step 2: Create a multi-level map

We are now going to create the map with the different levels of layers corresponding to the different levels of the hierarchy.

Add the map layer for regions

We start by adding the map layer containing regions:

  1. From the Studio, open the Map Manager: click the Managers button in the left-hand sidebar and then select Maps.
    Map manager
  2. Click the Add map button.
    ➡ The New map dialog box appears.
  3. Select the format of the map file. In this example, we use a JSON type file.
  4. Enter the name of the map. In this example, reg-dep.
  5. In the Role field, select None to share the map with all roles.
  6. In the File section, add the file corresponding to the map: regions.geojson
  7. Enter the name of the Level : here reg.
    New map
  8. Click OK.
    ➡ The map is then added to the list of available maps.

Add the map layer for departments

Now, we add the departments map level:

  1. Select the newly added regions map and click the Add a level button.
  2. In the New map dialog box, add the departments.geojson file as before and enter the name of the level, here dep for department.
    Add_level_EN.png
  3. Click OK.
    ➡ The dep level is added below the reg level.
    Map_added_EN.png
  4. Click OK to save the map and close the Map Manager.

Step 3: Create and configure the Open Street Map

  1. From the Studio Flow tab , click the New flow button.
  2. Select the Flow type OSM map.
    ➡ The Flow Properties window appears.
  3. Select the data model created earlier: Departments.
  4. Add the DEP dimension .
    ➡ The automatic level selection box is displayed.
  5. Select the Add the action "Navigate hierarchies" checkbox and click OK.
    Add_DEP_EN.png
  6. Add the Measure.
  7. In the Specific parameters tab,
    • select the Color depending to value checkbox: to define the colour of the zone depending to the value of the associated measurement (according to the chosen colour palette)
    • select the map previously added and validate.
      Map_settings_EN.png
      ➡ In the chart preview area, a yellow warning sign flashes

Warning_sign_EN.png

  1. Click it and validate the WFS layer association for each level by clicking OK.
    Layer association

    ➡ The regions are displayed using the current colour palette:
    Regions_initial_palette_FR.png

    You can click the 1738591809872-214.png button to view the WFS layer settings.
    Associate_WFS_layer_parameters_FR.png

We are now going to choose a more suitable colour palette:

  1. Click on the Colors button on the toolbar and then the Edit button to the right of the selected palette.
    ➡ The Colour palette setup window appears.
  2. Select the Flat Design 10 blue gradients palette.
    Color options

We're going to add a red border to make it easier to see the boundaries of the regions:

  1. Click the Bouton_calques.png button at the top right of the map and then the cogwheel next to regions.geojson.
    Attributs
  2. 1717167361648-114.gifClick in the Stroke field and select the dark red colour.
    Border
    ➡ We obtain the following rendering:
    Bordure ajoutée
  1. To see details of the departments, click a region.
  2. Add a border for departements.geojson in the same way as above.
    Sélection département
  3. Change the name of the Flow as desired and click OK.

The Open Street Map is now ready to be used in a dashboard.

Congratulations!

You've managed to create an Open Street Map and navigate on different levels.
Now all you have to do is apply it to your data!