Creating maps with layer filters

“Layer filters allow users to display only a subset of the original layer data based on the defined criteria”

Creating maps with layer filters enables the utilization of only a subset of features from a GeoNode layer. Maps are the primary form of sharing and publication within GeoNode, and they allow users to incorporate multiple layers into a single composition for data visualization purposes.

Layer filters limit the displayed features from a layer to only the subset defined by the filter query. Additionally, GeoNode maps enable layers to utilise multiple styles and can be added to a map multiple times, which allows users to have multiple representations of a single data source by using a combination of filtering and layer styles for advanced interactive compositions which can be shared directly with the target audience.

This module outlines the process of creating maps using a subset of the data for a single layer or a group of layers. This module assumes you have OpenStreetMap (OSM) data, such as roads and administrative boundaries, already uploaded to the relevant GeoNode instance and configured for cartographic representation.

You try:

Goal: To learn how to create maps using a subset of data (filtered) from GeoNode layer(s)

  • Choose the Create Map option from the maps menu
  • Select the OSM Roads Layer from the catalog and add it to the map
  • Add the OSM Admin layer to the map
  • Change the rendering order so that you can properly visualize all the relevant layers. In most cases, the layer order should be prioritised based on the layer geometry type and specify layers in the following priorities (in descending order): points, lines, polygons, rasters, and basemaps
  • Select the OSM Admin layer to ensure that it is active and then select the Filter Layer icon
  • Create an attribute filter using the expression "ADMIN_LEVEL" = 6, apply the filter and save your changes
  • Make the OSM Roads active and select the Filter Layer icon. Choose the filter type as Polygon. Select the geometric operation as Intersects
  • Draw a polygon on the map which will then filter to show only the roads that are visible within the user created polygon area

More about creating maps with filtered layers

After creating a filter and saving it the filter should be visible in the layer list. Layer filters can additionally be toggled between active and inactive states from the layer list. Filtering layers is very useful for defining a subset of the original data to create a detailed map of a specified area at lower scales. GeoNode supports various types of spatial and non-spatial data filters, including:

  • Attribute filters - uses attribute data to select values that are filtered. Supported operators are defined by data type and may include mathematical operators, such as =, >, or <=, as well as text based operators such as like or isNull. GeoNode supports multiple attribute filters on a single layer and can be combined with spatial filters (geometric operations)
  • Area of Interest - defines a spatial filter based on a user defined geometry and a spatial operator. Multiple spatial operators are supported including Intersects, Bounding Box, Is contained or Contains. User defined geometry can be limited to the current map ViewPort, or limited to a digitized geometry of Polygon, Rectangle, or Circle shape type
  • Layer filter - similar in function to Area of Interest filters, but applies spatial filtering based on positions relative to the defined filter layer. For example, it is possible to define a layer filter that only displays town points within the bounds of a specified administrative boundary layer

Check your knowledge:

  1. Why is it important to filter your data when creating a map:

    1. Just to show the capabilities of my GeoNode instance
    2. To extract some interesting pattern from a dataset based on some defined criteria or a particular area of interest
    3. You should always split layers that only cover a particular area of interest before uploading layers to GeoNode
  2. When creating maps can I also filter a raster layer using the attributes:

    1. It is not possible because raster data does not contain attribute information
    2. You can use the region of interest to restrict coverage of a raster layer
    3. GeoNode has not exposed this option because of it's complexity