Use cases Distance Overlay
This page describes two Distance Overlay use cases. The first use case is how to set up a project to calculate the surface area of a set of constructions within a certain distance of a waterway. See section Variations for other examples and inspirations how to model your distance calculations for your own use cases. The second use case is about counting the number of houses within a certain distance from two bus stops.
Use Case 1
As an authority, I am interested in how to calculate the amount of water-edge friendly vegetation, within 20 meters of the water edge. TQL can be used to calculate the amount of square meters of a specific function or category. But how to restrict counting the vegetation within 20 meters of the water edge?
Let us consider the use case, where I, as an authority, want to calculate the amount of square meters of deciduous trees within 20 meters of the water edge. It is currently possible to model this calculation. It requires the following:
- An attribute representing the distance;
- A terrain type describing the water;
- A function describing the deciduous trees;
- An distance overlay, calculating the distances;
- A TQL query calculating the lot-size of the deciduous trees within distance of the water;
Step 1: Assigning the distance Attribute
First, for this use-case, let us name the distance attribute DISTANCE_TO_WATER_EDGE. Next, we find the type of object we want to assign this attribute to. Since we want to calculate the area size of trees within a distance of 20 meters of water, we have to configure the water terrain with this distance attribute. Take the following steps: Template:Editor steps
Step 2: Configuring the Distance Zone Overlay
Multiple Overlays of the same type can be created and customized. To configure a distance Overlay, use the following steps: Template:Editor steps
Step 3: Creating the TQL Query
In order to dynamically calculate the amount of deciduous trees within 20 meters, we have to create a TQL query. Optionally, we can add this query to an Indicator. To construct the TQL query, take the following steps: Template:Editor steps
Testing the setup

To test the setup dynamically, you can perform these optional steps: We can add the deciduous trees function to the Actions of our Stakeholder. Furthermore, we can add open water to the actions or our stakeholder as well. With these two actions added to our stakeholder, we can start a test run and plan both deciduous trees and open water. By keeping the Query tool open, you can execute the query at any time to calculate the current area of deciduous trees within 20 meters of water. Optionally, you can construct an indicator that calculates this query instead, and visualize this number for users during a Single or Multi-user session.
Notes
There are several things to consider:
- The Distance Zone Overlay is a Grid Overlay. The accuracy is determined by the size of the grid cells. For more information about the grid size and its limits and Grid Overlays in general, see Grid Overlay.
- Since the distance is calculated using a grid, round-off effects occur when converting the Geo Data to a grid. This difference is noticeable for the defined distance in the Water terrain and the TQL query. To improve the accuracy, it is advised to make the distance in the water Terrain slightly larger than the maximum grid distance in the TQL query. In our case, lets say the configured grid size is 2 meters. An additional distance of two times 2 meters extra is more than enough. So a terrain attribute with distance 24 or 25 meters and a query maxgridvalue of 20 meters improves the accuracy of the returned result.
Variations
Several variations of this use case can be made. Consider for example:
- A different function;
- Instead of a function, a category of functions;
- Adding the distance attribute to multiple Terrain types, optionally with different distances per type of Terrain;
- Instead of adding the attribute to a Terrain, add the attribute to Function or a specific Building, or a self defined Area or Neighborhood;
- Optionally add a minimum grid Distance as well;
- The distance overlay legend can be customized. For example, in case the distance attribute is larger than the queried distance, only two categories can be made, one with the valid area of 20 meters, and a buffer zone with value 20.1 meters. The buffer zone color can even be made transparent.
Use Case 2
Let us consider the use case, where I, as an authority, want to calculate the number of houses that are located within 200 meters from two bus stops. This allows you to analyze the public transport accessibility for houses in that neighborhood. It requires the following to calculate this:
- A function value representing the radius of the distance zone;
- A Distance Zone Overlay, calculating the number of overlapping distance zones;
- A TQL query calculating the number of houses within the distance of multiple bus stops;
First, create a "Bus stop" action by assigning it a relevant function; in this example, we use 'Parkeerbord'.
Then, set the 'Distance Zone' attribute for the 'Parkeerbord' function to 200 meters.
Next, enable "Count Hits instead of Distance" in the Distance Zone Overlay.
Step 1: Creating the Bus-stop Action
First, for this use case, let us choose an action that can resemble a Bus stop. Next, we find the type of function we want to assign to this action. Take the following steps:
Template:Editor steps
Step 2: Specifying the Distance Zone radius of a function
Step 3: Configuring the Distance Zone Overlay
To add and configure a Distance Zone Overlay, use the following steps: Template:Editor steps
Step 4: Creating the TQL Query
In order to dynamically calculate the number of houses that lie within 200 meters of two bus stops, we have to create a TQL query. Optionally, we can add this query to an Indicator. To construct the TQL query, follow these steps: Template:Editor steps
Testing the setup
With the added Bus stop function to the Actions of our Stakeholder we can start a test run and start building our Bus stops in the project map. By keeping the Query tool opened, we can, at any time, execute the query and calculate the current number of houses located within 200 meters of two bus stops.The following values will be used for the TQL query: MAXGRIDVALUE: 200 and GRIDVALUE: 2.
Optionally, you can construct an indicator that calculates this query instead, and visualize this number for users during a Single or Multi-user session.
Notes
- The Distance Zone Overlay is a Grid Overlay. The accuracy is determined by the size of the grid cells. For more information about the grid size and its limits and Grid Overlays in general, see Grid Overlay.























