Combo Overlay tutorial: Difference between revisions

From Tygron Preview Support Wiki
Jump to navigation Jump to search
mNo edit summary
 
(26 intermediate revisions by the same user not shown)
Line 7: Line 7:


==Introduction to the Combo Overlay==
==Introduction to the Combo Overlay==
The [[Combo Overlay]] is a [[Grid Overlay]] which allows for the creation of custom spatial calculation models. It is comparable to raster calculators which can be found in other GIS packages such as QGIs. The principle on which it operates is that for each [[grid cell]], other [[Grid Overlay]]s may provide values, and the [[combo Overlay]] uniformly applies a (simple or complex) formula to compute a new resulting value for that [[grid cell]], and does so for all [[grid cell]]s.
The [[Combo Overlay]] is a [[Grid Overlay]] which allows for the creation of custom spatial calculation models. It is comparable to raster calculators which can be found in other GIS packages such as [[QGIS]]. The principle on which it operates is that for each [[grid cell]], other [[Grid Overlay]]s may provide values, and the [[combo Overlay]] uniformly applies a (simple or complex) formula to compute a new resulting value for that [[grid cell]], and does so for all [[grid cell]]s.
 
{{page break}}


==Creating a simple masking calculation==
==Creating a simple masking calculation==
Line 16: Line 18:
{{editor location|Overlays|dropdown=Environmental|3=Traffic Noise}}
{{editor location|Overlays|dropdown=Environmental|3=Traffic Noise}}


[[File:combo-overlay-tutorial-traffic-noise-add-small.jpg|350px|frame|center|Adding the [[Traffic Noise Overlay]] from the ribbon.]]
{{page break}}
This [[Traffic Noise Overlay]] will serve as the primary input to work with. It computes results based on built-in formulas for noise from traffic. Although it's possible to tweak the inputs and the [[legend]] of the resulting [[Overlay]], the principles of the calculation and the results thereof are immutable.
This [[Traffic Noise Overlay]] will serve as the primary input to work with. It computes results based on built-in formulas for noise from traffic. Although it's possible to tweak the inputs and the [[legend]] of the resulting [[Overlay]], the principles of the calculation and the results thereof are immutable.
[[File:combo-overlay-tutorial-traffic-noise-overlay-small.jpg|350px|frame|center|The traffic noise overlay is a standard calculation model.]]


Add a [[Combo Overlay]].
Add a [[Combo Overlay]].


{{editor location|Overlays|dropdown=Custom|3=Combo}}
{{editor location|Overlays|dropdown=Custom|3=Combo}}
[[File:combo-overlay-tutorial-combo-add-small.jpg|350px|frame|center|Adding the [[Combo Overlay]] from the ribbon.]]
{{page break}}
The [[Combo Overlay]] will, by itself, not show any significantly relevant results. This is because no inputs have yet been set, nor has a relevant formula been entered.
[[File:combo-overlay-tutorial-combo-1-small.jpg|350px|frame|center|The default results of the [[Combo Overlay]] are uniform and irrelevant.]]


The [[Combo Overlay]] accepts a set of inputs, which are [[Grid Overlay]]s.
The [[Combo Overlay]] accepts a set of inputs, which are [[Grid Overlay]]s.


===Notes===
Set Grid Overlay A to the added Traffic Noise Overlay.
* The legend of the first input is automatically read out by the [[Combo Overlay]] as the default legend. It is still possible to create a custom legend.
 
[[File:combo-overlay-tutorial-combo-inputA.jpg|350px|frame|center|Set the input A to the [[Traffic Noise Overlay]].]]
 
{{page break}}
Next, set the formula to:
 
{{code|A}}
 
[[File:combo-overlay-tutorial-combo-formulaA.jpg|350px|frame|center|This formula will directly output A.]]
 
Then, click on ""Update now" to recalculate the [[Overlay]]s.
 
The result is that for each [[Grid Cell]], the value of the input Overlay A, which is set to the [[Traffic Noise Overlay]], is used directly as the result.
 
Notice that the [[legend]] of the [[Traffic Noise Overlay]] is directly applied as well. this is because the legend of the first input is automatically read out by the [[Combo Overlay]] as the default legend for the [[Combo Overlay]] itself.
 
[[File:combo-overlay-tutorial-combo-2-small.jpg|350px|frame|center|The results of the [[Combo Overlay]] directly outputting the results of the [[Traffic Noise Overlay]].]]
 
{{page break}}
Just like with the [[Traffic Noise Overlay]] itself, it is possible to click on any location in the [[3D Visualization]] and see the exact value calculated there.
 
[[File:combo-overlay-tutorial-combo-2hover.jpg|350px|frame|center|The hover panel will display the name of the [[Combo Overlay]], and the value of that location.]]
 
Using the [[Combo Overlay]], it is possible to manipulate those calculated values. One often used principle is to "mask" data, which basically means to explicitly obscure or let through some values.
 
Modify the formula of the [[combo Overlay]], so that it reads as follows:
 
{{code|IF(GT(A, 55), A, NO_DATA)}}
 
[[File:combo-overlay-tutorial-combo-formulaMask.jpg|350px|frame|center|This formula will remove values lower than 55 from the results.]]
 
The formula now contains two logical operations, as well as a NO_DATA constant. The formula can be read as follows:
 
If ( IF ) it is true that A is greater than 55 ( GT ), in that case we use the value A. Otherwise, we return the value of NO_DATA, which is a constant meaning no value exists at that point.
 
{{page break}}
Click on "Update now" to recalculate the [[Overlay]]s.
 
The results of the [[Combo Overlay]] have now changed. Only in the places where the [[Traffic Noise Overlay]] computed a noise level of more than 55dB have results now been retained. In all other locations, the results have been discarded.
 
[[File:combo-overlay-tutorial-combo-3-small.jpg|350px|frame|center|Only results in locations with significant noise, greater than 55.]]
 
{{page break}}
==Rasterizing and combining data==
[[Combo Overlay]]s are, in and of themselves, effective tools for manipulating data. However, their effectiveness only goes as far as the input which can be provided to them. Therefor, it is also important to know how to turn other data in the {{software}} into [[Grid Overlay]]s as well.
 
To try this out, information about train tracks will be added to the [[Combo Overlay]], or more specifically information about the proximity of train tracks.
 
Train tracks have a number of trains running on them. This can be visualized using an [[Average Overlay]].
 
Add an [[Average Overlay]].
 
{{editor location|Overlays|Distance|3=Avg & Interpolation}}
 
[[File:combo-overlay-tutorial-avg-add-small.jpg|350px|frame|center|Adding an [[Average Overlay]] from the ribbon.]]
 
{{page break}}
Set the "Input" to "Attribute: Specific Layer", and the layer to "BUILDINGS". This will ensure the [[Average Overlay]] is specifically geared towards consululting data from [[Building]]s.
 
[[File:combo-overlay-tutorial-avg-setting1.jpg|350px|frame|center|The [[Average Overlay]] will only consult the [[Building]]s in the [[Project]].]]
 
Next, set the "Attribute" to "NUM_TRAINS". [[Trains per hour (Function Value)|NUM_TRAINS]] is the [[Attribute]] signifying the number of trains which travel across any given [[Building]], such as train tracks.
 
[[File:combo-overlay-tutorial-avg-setting2.jpg|350px|frame|center|The [[Average Overlay]] will refer to the [[Trains per hour (Function Value)|NUM_TRAINS]] [[Attribute]]. ]]
 
The "Cell averaging distance", which is set to 100m by default, can be left as-is.
 
{{page break}}
Finally, click on "Update now" to have the [[Average Overlay]] recalculate.
 
The result will be an Overlay which highlights train tracks, with a radius of 100m. Or in terms more practical for this setup: for any given [[grid cell]], the [[Average Overlay]] indicates whether a train track is within 100m.
 
[[File:combo-overlay-tutorial-avg-overlay-small.jpg|350px|frame|center|The results of the [[Average Overlay]] when configured.]]
 
Any cell with a value of 0 only has cells in a 100m radius with 0's. If any cell within that radius would feature a train track, the computed (average) value would be slightly more than 0. This value in and of itself is not significant or useful, but can serve as a filter to know which cells are "near a train track".
 
Now, switch back to the [[Combo Overlay]] by selecting it in the [[left panel]].
 
[[File:combo-overlay-tutorial-select-combo.jpg|350px|frame|center|Re-select the [[Combo Overlay]].]]
 
{{page break}}
Add a second input for the calculation. For Grid Overlay B, select the added [[Average Overlay]].
 
[[File:combo-overlay-tutorial-combo-inputB.jpg|350px|frame|center|Add the [[Average Overlay]] to the list of inputs.]]
 
Modify the formula of the [[Combo Overlay]], so that it reads as follows:
 
{{code|IF(GT(A, 55), ADD(A, IF(GT(B, 0), 5, 0)), NO_DATA)}}
 
[[File:combo-overlay-tutorial-combo-formulaTrain.jpg|350px|frame|center|This formula will increase the result, based on another input's value.]]
 
Instead of simply resuling in the value of A, instead the calculation will result in the combined values of A and either 5 or 0, depending on whether B has a value greater than 0. Since B will have a value slightly more than 0 when near a train track, this formula will now add an additional 5dB to the total result when near a train track.
 
{{page break}}
Click on "Update now" to recalculate the [[Overlay]]s.
 
The results are now subtly different, in that for all locations within 100m of the train tracks the noise level is computed as 5dB louder than otherwise.
 
[[File:combo-overlay-tutorial-combo-4-small.jpg|350px|frame|center|The results when adding train noise to the masked results.]]
 
{{page break}}
 
==Improving operations==
There is now also a  subtle error in this formula. The noise is only increased when the traffic noise in-and-of itself was already at a level of 55 dB. If that level was not reached before taking into consideration the train's noise, the results are already discarded. It would make more sense to first add the train's noise assumption to the calculated noise levels, and then test whether it exceeds some threshold.
 
To facilitate this, first the total noise will be calculated using a single [[Combo Overlay]]. Then, a second [[Combo Overlay]] will test whether the noise level should be reported or not.
 
Modify the [[Combo Overlay]]s formula to read as follows:
 
{{code|ADD(A, IF(GT(B, 0), 5, 0))}}
 
[[File:combo-overlay-tutorial-combo-formulaTrainNoMask.jpg|350px|frame|center|This formula will only add the values together (conditionally), and not mask the results anymore.]]
 
The masking clause has been removed, leaving only the traffic noise and conditional addition of the noise from the trains.
 
Recalculate, and the results will again cover the entire [[3D Visualization]].
 
[[File:combo-overlay-tutorial-combo-5-small.jpg|350px|frame|center|The results of just computing the cumulative noise, rather than masking the results.]]
 
{{page break}}
Add another [[Combo Overlay]].
 
{{editor location|Overlays|dropdown=Custom|3=Combo}}
 
As input A, set the first [[Combo Overlay]].
 
For the formula, ensure that it reads as follows:
 
{{code|IF(GT(A, 55), A, NO_DATA)}}
 
[[File:combo-overlay-tutorial-combo-formulaMaskOnly.jpg|350px|frame|center|This formula once again only displays the results if they are greater than 55.]]
 
Recalculate, and see the results.
 
[[File:combo-overlay-tutorial-combo-6-small.jpg|350px|frame|center|the results of first combining the noise, and then dropping results which are too low.]]
 
{{page break}}
 
==Presentation==
When creating custom [[Overlay]]s, be it with [[Average Overlay]]s or [[Combo Overlay]]s, it is very important to provide information on what the user is looking at. Especially for the relevant results but where possible also for intermediate steps.
 
Rename the Average Overlay, highlighting the train tracks, to "Train track vicinity".
 
[[File:combo-overlay-tutorial-name1.jpg|350px|frame|center|Renamed Overlay for the vicinity of train tracks.]]
 
Rename the first Combo Overlay to "Combined Noise".
 
[[File:combo-overlay-tutorial-name2.jpg|350px|frame|center|Renamed Overlay for combined noise.]]
 
Rename the second Combo Overlay to "Significant Noise".
 
[[File:combo-overlay-tutorial-name3.jpg|350px|frame|center|Renamed Overlay for noise if the noise is significant.]]
 
{{page break}}
Select the "Train Track vicinity" Overlay (the created Average Overlay), and in the right panel switch to the "Legend" tab.
 
[[File:combo-overlay-tutorial-legend1.jpg|350px|frame|center|The "Legend" tab. ]]
 
Ensure "Has Custom Legend" is checked. This allows setting which values resulting from the Overlay's calculation conform to which results. Modifying these values allow for creating a clearer or more relevant visualization of the data.
 
[[File:combo-overlay-tutorial-legend2.jpg|350px|frame|center|The option for a Custom Legend]]
 
Select 3 of the entries, and remove them.
 
[[File:combo-overlay-tutorial-legend3.jpg|350px|frame|center|Select the entries, then click remove at the bottom of the [[right panel]].]]
 
{{page break}}
Change the first entry's color to a dark-grey or black, set the name to "No", and ensure the value is 0.
 
Notice this immediately changes the visualization as well. Although the results of the calculation have not changed, and in fact no new calculation was performed, the way the results are shown are dynamically updated.
 
[[File:combo-overlay-tutorial-legend4.jpg|350px|frame|center|The changed entry, and the partially changed visualization to match.]]
 
Change the second entry's color to light-red, set the name to "Yes", and ensure the value is set to around 0,1 .
 
[[File:combo-overlay-tutorial-legend5.jpg|350px|frame|center|The changed entry, and the fully changed visualization to match.]]
 
{{page break}}
Notice the Overlay now does not show a progressive coloring, but more of a hard-line yes-or-no indication of what is or isn't near the tracks. This is both the only relevant information that can reasonably be read out of the Overlay, and also the way the information is used by the Combo Overlay. This makes the Overlay clearer and more useful to the user who eventually inspects and uses the Overlay or the [[Project]] it is part of.
 
The same principles of making the results more interpretable can apply to [[Combo Overlay]]s. However, the neccesity to tweak these is strongly dependent on how closely the results match the intent of legend of the first input Overlay.
 
{{page break}}
{{header|level=2|color=#c45911|Final assignments}}
* Add an additional [[Average Overlay]], which only highlights the location of the train track and not the region around it.
* Add an additional [[Combo Overlay]], which shows a color based on whether an area is away from the train tracks, near the train tracks, or itself train tracks.<br> Tip: You can add the results of multiple GT() operations together in a [[Combo Overlay]]'s formula.
 
{{Tutorial completed
| notes=
* The editor interface will generally present the first 3 inputs (A, B, and C) of the [[Combo Overlay]]. However, a total of 10 inputs can be added and used, by switching to the "inputs" tab.
* The editor interface will generally present the first 3 inputs (A, B, and C) of the [[Combo Overlay]]. However, a total of 10 inputs can be added and used, by switching to the "inputs" tab.
* It is possible to link multiple [[Combo Overlay]]s together by setting one as input for another. This way, intermediate results can be computed and presented, but also more complex calculations can be created and/or split up into managable sub-calculations.
| learned=how to create [[Combo Overlay]]s, and how to use [[Average Overlay]]s to rasterize data for use in the [[Combo Overlay]]
}}

Latest revision as of 07:21, 18 October 2023

Prerequisites

The following prerequisites should be met before starting this tutorial:

  • This tutorial relies on base knowledge about the editor interface and the creation of Overlays. If you have not yet followed the tutorials related to those subjects please do so first.
  • This tutorial can be followed with any project of any arbitrary location, preferably with both roads and traintracks. 

Preparations

Take the following steps as preparation for following this tutorial:

  • Start your project. This can be a pre-existing project, or a newly created project.

Introduction to the Combo Overlay

The Combo Overlay is a Grid Overlay which allows for the creation of custom spatial calculation models. It is comparable to raster calculators which can be found in other GIS packages such as QGIS. The principle on which it operates is that for each grid cell, other Grid Overlays may provide values, and the combo Overlay uniformly applies a (simple or complex) formula to compute a new resulting value for that grid cell, and does so for all grid cells.

Creating a simple masking calculation

To get started with a Combo Overlay, it is basically always neccesary to have some other Grid Overlay in the same Project to run a calculation on.

Add a Traffic Noise Overlay.

Editor → Current Situation (Ribbon tab) → Overlays (Ribbon bar) → Environmental (Dropdown) → Traffic Noise
Adding the Traffic Noise Overlay from the ribbon.

This Traffic Noise Overlay will serve as the primary input to work with. It computes results based on built-in formulas for noise from traffic. Although it's possible to tweak the inputs and the legend of the resulting Overlay, the principles of the calculation and the results thereof are immutable.

The traffic noise overlay is a standard calculation model.

Add a Combo Overlay.

Editor → Current Situation (Ribbon tab) → Overlays (Ribbon bar) → Custom (Dropdown) → Combo
Adding the Combo Overlay from the ribbon.

The Combo Overlay will, by itself, not show any significantly relevant results. This is because no inputs have yet been set, nor has a relevant formula been entered.

The default results of the Combo Overlay are uniform and irrelevant.

The Combo Overlay accepts a set of inputs, which are Grid Overlays.

Set Grid Overlay A to the added Traffic Noise Overlay.

Set the input A to the Traffic Noise Overlay.

Next, set the formula to:

A
This formula will directly output A.

Then, click on ""Update now" to recalculate the Overlays.

The result is that for each Grid Cell, the value of the input Overlay A, which is set to the Traffic Noise Overlay, is used directly as the result.

Notice that the legend of the Traffic Noise Overlay is directly applied as well. this is because the legend of the first input is automatically read out by the Combo Overlay as the default legend for the Combo Overlay itself.

The results of the Combo Overlay directly outputting the results of the Traffic Noise Overlay.

Just like with the Traffic Noise Overlay itself, it is possible to click on any location in the 3D Visualization and see the exact value calculated there.

The hover panel will display the name of the Combo Overlay, and the value of that location.

Using the Combo Overlay, it is possible to manipulate those calculated values. One often used principle is to "mask" data, which basically means to explicitly obscure or let through some values.

Modify the formula of the combo Overlay, so that it reads as follows:

IF(GT(A, 55), A, NO_DATA)
This formula will remove values lower than 55 from the results.

The formula now contains two logical operations, as well as a NO_DATA constant. The formula can be read as follows:

If ( IF ) it is true that A is greater than 55 ( GT ), in that case we use the value A. Otherwise, we return the value of NO_DATA, which is a constant meaning no value exists at that point.

Click on "Update now" to recalculate the Overlays.

The results of the Combo Overlay have now changed. Only in the places where the Traffic Noise Overlay computed a noise level of more than 55dB have results now been retained. In all other locations, the results have been discarded.

Only results in locations with significant noise, greater than 55.

Rasterizing and combining data

Combo Overlays are, in and of themselves, effective tools for manipulating data. However, their effectiveness only goes as far as the input which can be provided to them. Therefor, it is also important to know how to turn other data in the Tygron Platform into Grid Overlays as well.

To try this out, information about train tracks will be added to the Combo Overlay, or more specifically information about the proximity of train tracks.

Train tracks have a number of trains running on them. This can be visualized using an Average Overlay.

Add an Average Overlay.

Editor → Current Situation (Ribbon tab) → Overlays (Ribbon bar) → Distance (Left panel) → Avg & Interpolation
Adding an Average Overlay from the ribbon.

Set the "Input" to "Attribute: Specific Layer", and the layer to "BUILDINGS". This will ensure the Average Overlay is specifically geared towards consululting data from Buildings.

The Average Overlay will only consult the Buildings in the Project.

Next, set the "Attribute" to "NUM_TRAINS". NUM_TRAINS is the Attribute signifying the number of trains which travel across any given Building, such as train tracks.

The Average Overlay will refer to the NUM_TRAINS Attribute.

The "Cell averaging distance", which is set to 100m by default, can be left as-is.

Finally, click on "Update now" to have the Average Overlay recalculate.

The result will be an Overlay which highlights train tracks, with a radius of 100m. Or in terms more practical for this setup: for any given grid cell, the Average Overlay indicates whether a train track is within 100m.

The results of the Average Overlay when configured.

Any cell with a value of 0 only has cells in a 100m radius with 0's. If any cell within that radius would feature a train track, the computed (average) value would be slightly more than 0. This value in and of itself is not significant or useful, but can serve as a filter to know which cells are "near a train track".

Now, switch back to the Combo Overlay by selecting it in the left panel.

Re-select the Combo Overlay.

Add a second input for the calculation. For Grid Overlay B, select the added Average Overlay.

Add the Average Overlay to the list of inputs.

Modify the formula of the Combo Overlay, so that it reads as follows:

IF(GT(A, 55), ADD(A, IF(GT(B, 0), 5, 0)), NO_DATA)
This formula will increase the result, based on another input's value.

Instead of simply resuling in the value of A, instead the calculation will result in the combined values of A and either 5 or 0, depending on whether B has a value greater than 0. Since B will have a value slightly more than 0 when near a train track, this formula will now add an additional 5dB to the total result when near a train track.

Click on "Update now" to recalculate the Overlays.

The results are now subtly different, in that for all locations within 100m of the train tracks the noise level is computed as 5dB louder than otherwise.

The results when adding train noise to the masked results.

Improving operations

There is now also a subtle error in this formula. The noise is only increased when the traffic noise in-and-of itself was already at a level of 55 dB. If that level was not reached before taking into consideration the train's noise, the results are already discarded. It would make more sense to first add the train's noise assumption to the calculated noise levels, and then test whether it exceeds some threshold.

To facilitate this, first the total noise will be calculated using a single Combo Overlay. Then, a second Combo Overlay will test whether the noise level should be reported or not.

Modify the Combo Overlays formula to read as follows:

ADD(A, IF(GT(B, 0), 5, 0))
This formula will only add the values together (conditionally), and not mask the results anymore.

The masking clause has been removed, leaving only the traffic noise and conditional addition of the noise from the trains.

Recalculate, and the results will again cover the entire 3D Visualization.

The results of just computing the cumulative noise, rather than masking the results.

Add another Combo Overlay.

Editor → Current Situation (Ribbon tab) → Overlays (Ribbon bar) → Custom (Dropdown) → Combo

As input A, set the first Combo Overlay.

For the formula, ensure that it reads as follows:

IF(GT(A, 55), A, NO_DATA)
This formula once again only displays the results if they are greater than 55.

Recalculate, and see the results.

the results of first combining the noise, and then dropping results which are too low.

Presentation

When creating custom Overlays, be it with Average Overlays or Combo Overlays, it is very important to provide information on what the user is looking at. Especially for the relevant results but where possible also for intermediate steps.

Rename the Average Overlay, highlighting the train tracks, to "Train track vicinity".

Renamed Overlay for the vicinity of train tracks.

Rename the first Combo Overlay to "Combined Noise".

Renamed Overlay for combined noise.

Rename the second Combo Overlay to "Significant Noise".

Renamed Overlay for noise if the noise is significant.

Select the "Train Track vicinity" Overlay (the created Average Overlay), and in the right panel switch to the "Legend" tab.

The "Legend" tab.

Ensure "Has Custom Legend" is checked. This allows setting which values resulting from the Overlay's calculation conform to which results. Modifying these values allow for creating a clearer or more relevant visualization of the data.

The option for a Custom Legend

Select 3 of the entries, and remove them.

Select the entries, then click remove at the bottom of the right panel.

Change the first entry's color to a dark-grey or black, set the name to "No", and ensure the value is 0.

Notice this immediately changes the visualization as well. Although the results of the calculation have not changed, and in fact no new calculation was performed, the way the results are shown are dynamically updated.

The changed entry, and the partially changed visualization to match.

Change the second entry's color to light-red, set the name to "Yes", and ensure the value is set to around 0,1 .

The changed entry, and the fully changed visualization to match.

Notice the Overlay now does not show a progressive coloring, but more of a hard-line yes-or-no indication of what is or isn't near the tracks. This is both the only relevant information that can reasonably be read out of the Overlay, and also the way the information is used by the Combo Overlay. This makes the Overlay clearer and more useful to the user who eventually inspects and uses the Overlay or the Project it is part of.

The same principles of making the results more interpretable can apply to Combo Overlays. However, the neccesity to tweak these is strongly dependent on how closely the results match the intent of legend of the first input Overlay.

Final assignments

  • Add an additional Average Overlay, which only highlights the location of the train track and not the region around it.
  • Add an additional Combo Overlay, which shows a color based on whether an area is away from the train tracks, near the train tracks, or itself train tracks.
    Tip: You can add the results of multiple GT() operations together in a Combo Overlay's formula.

Final notes

Although not part of the general explanation provided in this tutorial, the following notes are important to keep in mind:

  • The editor interface will generally present the first 3 inputs (A, B, and C) of the Combo Overlay. However, a total of 10 inputs can be added and used, by switching to the "inputs" tab.

Tutorial completed

Congratulations. You have now completed this tutorial. In it, you have learned how to create Combo Overlays, and how to use Average Overlays to rasterize data for use in the Combo Overlay.