Use cases Distance Overlay: Difference between revisions

From Tygron Support wiki
Jump to navigation Jump to search
No edit summary
Line 1: Line 1:
This page describes how to set up a project to calculate the lot- or floor-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.
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==
==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 vegetatino within 20 meters of the water edge?  
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==
==Distance Overlay==
Line 8: Line 8:


==Use Case==
==Use Case==
Let us consider the usecase, 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:
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;
* An attribute representing the distance;
* A terrain type describing the water;
* A terrain type describing the water;
* A function describing the deciduous trees;
* A function describing the deciduous trees;
* An distance overlay, calculating the distances;
* An distance overlay, calculating the distances;
* A TQL query calculating the lotsize of the deciduous trees within distance of the water;
* A TQL query calculating the lot-size of the deciduous trees within distance of the water;


===Step 1: Assigning the distance Attribute===
===Step 1: Assigning the distance Attribute===

Revision as of 10:20, 8 June 2017

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

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 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 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.