Use cases Distance Overlay: Difference between revisions

From Tygron Support wiki
Jump to navigation Jump to search
Line 94: Line 94:
|Select Assigned Actions in the drop-down menu of the action menu;
|Select Assigned Actions in the drop-down menu of the action menu;
|Select [[Functions]] in the [[right panel]];
|Select [[Functions]] in the [[right panel]];
|Select Overig in the Functions drop-down menu;
|Select Overig in the [[Functions]] drop-down menu;
|Select Parkeerbord in the Overig drop-down menu;
|Select Parkeerbord in the Overig drop-down menu;
|Notice that the selected function is now added to the Assigned [[Actions]] in the [[left panel]];
|Notice that the selected function is now added to the Assigned [[Actions]] in the [[left panel]];

Revision as of 09:43, 26 September 2018

This page describes how to set up a project to calculate the lot-size of a set of buildings within a distance of a waterway. See section #Variations for other examples and inspirations how to model your distance calculations for your own use cases.

Introduction

Let us consider the following use-case. As an authority, I am interested in how to calculate the amount of water-edge friendly vegetation, within 20 meters of the water edge. Using TQL, it is already easy 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?

Distance Overlay

Preview Server version 2017.2.0 added the possibility to add multiple instances of the distance overlay and customize the attribute containing the distance. Originally this distance was used as safety distance or noise disturbance distance. These distances describe a negative impact. However, with the customizable attribute, it can also be used in a more positive way.

Use Case 1

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:

How to How to add an attribute to a type of Terrain:
  1. Open the project in Editor Mode;
  2. Select Geo Data in the ribbon header;
  3. Select Terrain in the ribbon bar;
  4. Select a Terrain. In this case Water;
  5. Click on the tab Attributes;
  6. Scroll down the list and fill in the attribute in the text field of Add new Attribute with Name. In this case DISTANCE_TO_WATER_EDGE;
  7. Fill in the desired distance in the text field of Add new Attribute with Value. In this case 20. For reasons described in [Notes], it can also be set to a slightly larger value than 20, for example 25;
  8. Click on Save new Attribute;
  9. Notice that the attribute has been added to the selected Terrain Type.

Step 2: Configuring the Distance Zone Overlay

Configuring a distance Overlay is relatively easy. Currently, multiple Overlays of the same type can be created and customized. To add and configure a distance Overlay, use the following steps:

How to How to configure a distance Overlay:
  1. Open the project in Editor Mode;
  2. Select Geo Data in the ribbon header;
  3. Hover Overlays in the ribbon bar to show the Overlays popup;
  4. Select Add Distance Zone in the Overlays popup; This adds a new distance Overlay;
  5. The overlays list should be shown on the left and the newly added distance Overlay should be selected. If not, select it manually;
  6. In the text field Attribute selected in first: Building, Terrain, Area or Neighborhood on the right, fill in the attribute name. In this case fill in DISTANCE_TO_WATER_EDGE;
  7. (Optional) Change the general grid size of grid Overlays in your project;
  8. (Optional) Change the name of the Overlay

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 Excel Indicator. To construct the TQL query, take the following steps:

How to How to create a distance TQL query:
  1. Open the project in Editor Mode;
  2. Select Indicators in the ribbon header;
  3. Select Query Tool in the ribbon bar to show the Query Tool panel;
  4. Set the upper left drop-down on SELECT;
  5. Select in the second drop-down the type of information calculated. In our case lot size;
  6. Add three clauses;
  7. Select FUNCTION in the first clause, and select the desired Function in the second drop-down. In our case, select the Function 'Deciduous Trees';
  8. Select GRID in the second clause and select the desired Grid Overlay. In our case, this is the added distance overlay in the previous section;
  9. Select MAXGRIDVALUE in the third clause, and fill in the distance in meters. In our case fill in 20;
  10. (Optionally) Notice the query is created in the text field at the bottom of the panel.
  11. Press the execute query to calculate the result of the query.

Testing the setup

A result of a test run with a distance overlay and a query for deciduous trees with 20 meters.

In order to test the setup in a dynamic case, we optionally have to do one or more things. 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 Session and plan both deciduous trees and open water. By keeping the Query tool opened, we can, at any time, execute the query and calculate the current amount of square meters 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 buildings that are located at X meters from a bus-stop. It is currently possible to model this calculation. It requires the following:

  • A function value representing the max distance;
  • A Distance Zone Overlay, calculating the distances;
  • A TQL query calculating the number of buildings within distance of the bus-stop;

Step 1: Creating the Bus-stop Action

First, for this use-case, let us name the action Bus-stop. Next, we find the type of function we want to assign to this action. Take the following steps:

How to How to add an action to a stakeholder:
  1. Open the project in Editor Mode;
  2. Select Stakeholders in the ribbon header;
  3. Select Actions in the ribbon bar;
  4. Select Add at the bottom of the left panel. A new action menu will appear in the list on the left panel;
  5. Select the new action menu in the left panel;
  6. Change the name of the new action menu in the right panel;
  7. Select Assigned Actions in the drop-down menu of the action menu;
  8. Select Functions in the right panel;
  9. Select Overig in the Functions drop-down menu;
  10. Select Parkeerbord in the Overig drop-down menu;
  11. Notice that the selected function is now added to the Assigned Actions in the left panel;

Step 2: Changing the Bus-stop function distance attribute

How to How to change the bus-stop function distance parameter:
  1. Open the project in Editor Mode;
  2. Select Indicators in the ribbon header;
  3. Select Function Values in the ribbon bar;
  4. Notice that a table has appeared with all the functions in a row and their attributes in the columns;
  5. Find the Parkeerbord function in the table and select the Distance Zone Attribute in the corresponding column;
  6. Write the desired distance in meters for the distance zone attribute;
  7. Notice that the bus-stops in the project will have this distance;

Step 3: Configuring the Distance Zone Overlay

Configuring a Distance Zone Overlay is relatively easy. Currently, multiple Overlays of the same type can be created and customized. To add and configure a Distance Zone Overlay, use the following steps:

How to How to configure a Distance Zone Overlay:
  1. Open the project in Editor Mode;
  2. Select Geo Data in the ribbon header;
  3. Hover Overlays in the ribbon bar to show the Overlays popup;
  4. Select Add Distance Zone in the Overlays popup; This adds a new Distance Zone Overlay;
  5. The Overlays list should be shown on the left and the newly added Distance Zone Overlay should be selected. If not, select it manually;
  6. Select the "Count Hits instead of Distance" option;
  7. (Optional) Change the general grid size of grid Overlays in your project;
  8. (Optional) Change the name of the Overlay;

Step 4: Creating the TQL Query

In order to dynamically calculate the number of buildings within the desired distance of the bus-stops, we have to create a TQL query. Optionally, we can add this query to an Excel Indicator. To construct the TQL query, take the following steps:

How to How to create a distance TQL query:
  1. Open the project in Editor Mode;
  2. Select Indicators in the ribbon header;
  3. Select Query Tool in the ribbon bar to show the Query Tool panel;
  4. Set the upper left drop-down on SELECT;
  5. Select in the second drop-down the type of information calculated. UNITS;
  6. Add three clauses;
  7. Select GRID in the first clause, and select the desired Grid Overlay in the second drop-down. In our case, select the Grid Overlay 'Distance Zone';
  8. Select GRIDVALUE in the third clause, and fill in the number of bus-stops that are within the predefined distance of a building. Here you can fill in 1, 2, 3, etc.;
  9. (Optionally) Notice the query is created in the text field at the bottom of the panel.
  10. Press the execute query to calculate the result of the query.

Testing the setup

With the added Parkeerbord function to the Actions of our Stakeholder we can start a Test Session. By keeping the Query tool opened, we can, at any time, execute the query and calculate the current number of buildings within X meters of the bus-stops.
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.