How to use building attributes in a Combo Overlay

From Tygron Preview Support Wiki
Jump to navigation Jump to search

Building attributes can be accessed directly in a Combo Overlay by configuring attribute keys. In this how to both a Global as a Building attribute is used to converted a daily average traffic amount to an hourly traffic amount.

How to use building attributes in a Combo Overlay:
  1. Select Current Situation in the ribbon bar.
  2. Hover over Overlays and under Grid Calculation, select Average and Interpolation.
  3. In the Average Overlay Detail Panel, change the Cell Average Distance to 0.
  4. Select the NUM_CARS attribute
  5. Select the Attributes tab and change the ATTRIBUTE TIMEFRAMES to 24.
  6. With the Average Overlay configured, select Current Situation in the ribbon bar.
  7. Hover over Globals in the ribbon bar and select Add new Global.
  8. In the Global detail panel, change the name to HOURLY_TRAFFIC_VALUES.
  9. Set the start values to the following array:
    0,12 0,06 0,024 0,048 0,108 0,48 1,32 1,8 1,8 1,44 1,2 1,2 1,44 1,44 1,68 1,92 1,8 1,8 1,32 0,96 0,72 0,6 0,48 0,24
  10. With the Global configured, select Current Situation in the ribbon bar.
  11. Hover over Overlays and under Grid Calculation, select Combo Overlay to add a new Combo Overlay
  12. In the Combo detail panel, select the tab Input
  13. For Attribute A, select the attribute: NUM_CARS
  14. Select the general tab.
  15. For Input A, select the Average Overlay.
  16. Click on the enlarge link next to Formula to edit the Combo Overlay's formula.
  17. Write the following formula
    IF(OR(A1:23), AT, MUL(GLOBAL_HOURLY_TRAFFIC_FACTOR, @A))
  18. Close the formula panel.
  19. Click on update now in the Overlay detail panel.
  20. Once calculated, inspect the resulting overlay.

Legend used in how-to

The content below can we copied and pasted as a legend for the Average and Combo overlay.

 [ { "color" : { "argb" : -1 }, "entryName" : "None", "id" : 1, "value" : 0.0 } , { "color" : { "argb" : -15414180 }, "entryName" : "10", "id" : 2, "value" : 10.0 } , { "color" : { "argb" : -12923884 }, "entryName" : "200", "id" : 3, "value" : 200.0 } , { "color" : { "argb" : -5714924 }, "entryName" : "400", "id" : 4, "value" : 400.0 } , { "color" : { "argb" : -3374828 }, "entryName" : "800", "id" : 5, "value" : 800.0 } , { "color" : { "argb" : -65536 }, "entryName" : "1200", "id" : 6, "value" : 1200.0 } , { "color" : { "argb" : -65281 }, "entryName" : "2500", "id" : 7, "value" : 2500.0 } ] 

Notes

  • The values provided for the Global are example values and can be adjusted.
  • The formula uses an if or statement for the average overlay, such that it selects the Average Overlay' s values if it has a number larger than zero, and select the Combo Overlay Multiplication otherwise. This way roads with multiple num_car values is not adjusted; only roads with a single num cars value are.

How-to's

See also