Terrains: Difference between revisions

From Tygron Preview Support Wiki
Jump to navigation Jump to search
No edit summary
Line 1: Line 1:
{{being updated}}
{{learned|file=Terrain-Q3-2015.jpg|what Terrain is|how Terrains relate to the Tygron engine|about the different Terrain types in the Tygron engine|how to add Terrain to your project|how to change Terrain in your project}}
{{learned|file=Terrain-Q3-2015.jpg|what Terrain is|how Terrains relate to the Tygron engine|about the different Terrain types in the Tygron engine|how to add Terrain to your project|how to change Terrain in your project}}


Line 191: Line 192:
File:QGIS-Repeat.jpg|7. Repeat the process for each desired consecutive value for the selected feature layer
File:QGIS-Repeat.jpg|7. Repeat the process for each desired consecutive value for the selected feature layer
File:QGIS-rename.jpg|8. Rename the imported terrains to a more logical name, this name will also appear in the legend of the terrain overlay
File:QGIS-rename.jpg|8. Rename the imported terrains to a more logical name, this name will also appear in the legend of the terrain overlay
File:QGIS-SelectOverlayColor.jpg|9. Select an appropriate color for the just created terrain layer
File:QGIS-SelectOverlayColor.jpg|9. Select an appropriate color for the just created terrain layer  
File:example.jpg|10.
File:example.jpg|11.
</gallery>
</gallery>


{{Editor steps|title=make an overlay for a GeoJSON file based terrain in the Tygron editor|Open the Tygron Editor and create or load a project for the selected area|Drag and drop the new GeoJSON file anywhere on the editor window|When a new panel asks what to do with the file, select to import as a terrain|Another new panel now asks for certain features to be set, such as 'Merge polygons' and which layer features to filter| The Values button displays an information panel with all available values for the selected layer feature|Enter one value and select Send, a new terrain is now imported, with a polygon of one piece and depicting the selected value|Repeat the process for each desired consecutive value for the selected feature layer|Rename the imported terrains to a more logical name, this name will also appear in the legend of the terrain overlay (see below)|Select an appropriate color for the just created terrain layer}}
{{Editor steps|title=make an overlay for a GeoJSON file based terrain in the Tygron editor|Open the Tygron Editor and load the project for the selected area|Select 3D World > Overlays > Edit Overlays|On the left side, select to add a new 'terrain'|Select the newly added terrain from the list|Rename the new overlay with a suitable name on the right side panel|Check the selection boxes of the desired terrains from the list on the right side. A new overlay icon and legend will appear in the editor main view|The new overlay is now selectable, showing all colored terrain layers in one image}}
<br />
<br />
<gallery mode="nolines">
<gallery mode="nolines">
File:example.jpg|1. Create or load a project for the selected area in the Tygron Editor
File:QGIS-GenerateProject.jpg|1. Open the Tygron Editor and load the project for the selected area
File:example.jpg|2. Drag and drop the new GeoJSON file anywhere on the Tygron editor window
File:QGIS-SelectEditOverlay.jpg|2. Select 3D World > Overlays > Edit Overlays
File:example.jpg|3. Select to import as a terrain when prompted
File:QGIS-AddNewOverlay.jpg|3. On the left side, select to add a new 'terrain' overlay
File:example.jpg|4. Select, if desired, 'Merge polygons' and which layer features to filter
File:QGIS-SelectNewlyAdded.jpg|4. Select the newly added terrain overlay from the list
File:example.jpg|5. The Values button displays an information panel with all available values for the selected layer feature
File:QGIS-RenameOverlay.jpg|5. Rename the new overlay with a suitable name on the right side panel
File:example.jpg|6. Enter the desired value and select Send, a new terrain is now imported (3D World > Terrains > Edit Terrains)
File:QGIS-CheckDesiredTerrains.jpg|6. Check the selection boxes of the desired terrains from the list on the right side
File:example.jpg|7. Repeat the process for each desired consecutive value for the selected feature layer
File:QGIS-TerrainOverlay.jpg|7. The new overlay is now selectable, showing all colored terrain layers in one image
File:example.jpg|8. Rename the imported terrains to a more logical name, this name will also appear in the legend of the terrain overlay
File:example.jpg|9. Select an appropriate color for the just created terrain layer
File:example.jpg|10.
File:example.jpg|11.
</gallery>
</gallery>

Revision as of 14:44, 8 December 2015

Please note: This page is currently being updated.

Template:Learned

What is Terrain

Terrain (plural terrains): An area of land and/ or the particular features of it.

What does Terrain mean in the Tygron Engine?

In the Tygron Engine terrain types can be selected for a specified area in the 3D world. Such a terrain type can have different features assigned according to the specific type selected. Terrain types in the Tygron Engine are; Flooding Terrain, Sewer Terrain, Safe Zone Terrain, Normal Terrain, Terrain imported from ArcGIS and Terrain imported as GeoJSON file.

Available terrain types in the Tygron Engine?

Flooding Terrain

A Flooding Terrain is a visualization of an inundation of (a part of) the 3D world. The user can select tha area, the amount of water and color of the flooding overlay. To visualize the Flooding Terrain on both the 3D world and mini map, a dedicated overlay can be added. In order to trigger the flooding manually/ as part of an event, the Flooding terrain needs to be linked to the weather type Flooding (in Animations).

Sewer Terrain

This terrain type sets the amount of drainage for a specified area. This terrain can then be visualized as overlay.

Safe Zone Terrain

Implementing this terrain type enables the user to assign areas that will not be flooded by a Safe Zone Flooding. This can be used to visualize the effects of flood protection alignments. Areas in this Safe Zone will not be flooded, and areas added to this safe zone by adding levees and alignments are indicated by a separate color.

Terrain imported from ArcGIS

It is possible to import terrain layers from the ArcGIS service from Esri, for those terrain data layers that are not by default loaded when creating a project in the Tygron Engine. An Esri/ ArcGIS account is not required to be able to import publicly published services from the online ArcGIS repository. When the user wants to create his own ArcGIS terrains, appropriate software is needed to create such shapefiles and contour polygons, after which the file needs to be uploaded and published as a feature service in the ArcGIS account of the user/ organisation. It is important to publish the data as a feature service, because this service allows for queries to search the included data. A Map service for example, is only a polygon as an image, that can better be used as an overlay, as there is not data in this published map format that can be searched for with a query. See also Tygron Query Language

Terrain imported as GeoJSON file

Because the Tygron Engine uses the GeoJSON file format, it is also possible to upload GeoJSON files directly into your project. This process has as advantage that (proprietary) data does not need access to ArcGIS. As there is no need to publish the data as a feature service, no account is required. Only a third party GIS editor is needed to export shapefiles into GeoJSON format.

Normal Terrain

A normal terrain is a terrain which can be used in combination with the Tygron Query Language (TQL). You can use this terrain to separate your project in different specific locations, each with their own objective.

What types of terrain can be used in the Tygron Engine?

Flooding Terrain

A Flooding Terrain is a visualization of an inundation of (a part of) the 3D world. The user can select the area to be flooded, the amount of flood water and the color of the flooding on the overlay. To visualize the Flooding Terrain on both the 3D world and mini map, a dedicated overlay can be added. In order to trigger the flooding manually/ as part of an event, the flooding terrain needs to be linked to the weather type Flooding (in Animations).

Creating a Flooding terrain

How to create a Flooding Terrain:
  1. Select 3D World > Terrains > Add Flooding Terrain
  2. Rename the new Flooding Terrain in the 'Name' field on the right side of main view, if desired
  3. Select a color from the drop down menu 'Color on Overlay'
  4. Enter a value for 'Flood water level in meters/ ft'
  5. Select if the Flooding Terrain is 'Active in Simulation'
  6. Select the 'Adjust Area' button to enable the brush panel under the main view port
  7. Select the area if the 3D world where the flooding takes place
  8. Apply selection


Adding a Flooding Terrain Overlay

How to add a Flooding Terrain Overlay:
  1. Select 3D World > Overlays
  2. Select 'TERRAIN_FLOODING' from the drop down menu on the bottom left of the screen
  3. Select to Add the terrain overlay
  4. Notice Overlay icon is now available under mini map


Linking Flooding Terrain to Flooding Weather, to manually trigger flooding

To enable the flooding to be triggered manually, a dedicated measure must be created. In this measure, the Flooding Terrain and Flooding Weather type are linked. The measure can then be assigned to an Action menu, to be accessible for the user.
How to link Flooding Terrain to Flooding Weather:
  1. Select Animations > Weather > Add Flooding
  2. Rename the new Flooding Weather in the 'Name' field on the right side of main view, if desired
  3. Select visual effect and Auto trigger, if desired
  4. Enter values for 'Weather Duration in seconds', 'Flooding waterlevel in meters/ ft', 'Amount of rain', 'Duration of rainfall' and 'Annual rainfall increment'
  5. Select Stakeholders > Measures > Add empty measure
  6. Select 'Events' for the newly created measure
  7. Add on the right side panel a Server event 'TERRAIN_SET_ACTIVE'
  8. Add the Flooding Terrain to this event from the drop down list underneath the main view port
  9. Add on the right side panel a Client event 'ACTIVATE_WEATHER'
  10. Add the Weather ID 'Flooding' to this event from the drop down list underneath the main view port
  11. Select 3D world > Actions
  12. Add a new action menu
  13. Assign the newly created measure to the new Action menu


Sewer Terrain

This terrain type sets the amount of drainage for a specified area. This terrain can then be visualized as overlay.

Adding a Sewer Terrain & Overlay

How to add Sewer Terrain & Overlay:
  1. Select 3D World > Terrains > Add Sewer Terrain
  2. Rename the terrain in the 'Name' field, if desired
  3. Select an appropriate overlay color
  4. Enter a value for 'Sewer Water Storage per min'
  5. Check to activate terrain in simulation
  6. Select 'Adjust Area' to draw the terrain in the 3D world
  7. Select 3D world > Overlays
  8. Select to add a 'TERRAIN_SEWER' overlay


Safe Zone Terrain

Implementing this terrain type enables the user to assign areas that will not be flooded by a Safe Zone Flooding. This can be used to visualize the effects of flood protection alignments. Areas in this Safe Zone will not be flooded, and areas added to this safe zone by adding levees and alignments are indicated by a separate color.

Adding a Safe Zone Terrain & Overlay

How to add Safe Zone Terrain & Overlay:
  1. Select 3D World > Terrains > Add Safe Zone Terrain
  2. Rename the terrain in the 'Name' field, if desired
  3. Select an appropriate overlay color for the original safe zone and extended safe zone
  4. Check to activate terrain in simulation
  5. Select 'Adjust Area' to draw the original safe zone terrain in the 3D world
  6. Select 3D world > Overlays
  7. Select to add a 'TERRAINS' overlay
  8. Highlight the new 'Special Terrain' and select 'Safe Zone Terrain' from the right side panel


Normal Terrain

This terrain type can be used to designate/ revert areas with other terrain types, back to normal terrain features. This avoids having to manually remove other terrains, for instance when overlapping.

Adding Normal Terrain & Overlay

How to add Normal Terrain & Overlay:
  1. Select 3D World > Terrains > Add Normal Terrain
  2. Rename the terrain in the 'Name' field, if desired
  3. Select an appropriate overlay color
  4. Check to activate terrain in simulation
  5. Select 'Adjust Area' to draw the terrain in the 3D world
  6. Select 3D world > Overlays
  7. Select to add a 'TERRAINS' overlay
  8. Highlight the new 'Special Terrain' and select 'Normal Terrain' from the right side panel


Terrain imported from ArcGIS

It is possible to import terrain layers from the ArcGIS service from Esri, for those terrain data layers that are not by default loaded when creating a project in the Tygron Engine. An Esri/ ArcGIS account is not required to be able to import publicly published services from the online ArcGIS repository. When the user wants to create his own ArcGIS terrains, appropriate software is needed to create such shapefiles and contour polygons, after which the file needs to be uploaded and published as a feature service in the ArcGIS account of the user/ organisation. It is important to publish the data as a feature service, because this service allows for queries to search the included data. A Map service for example, is only a polygon as an image, that can better be used as an overlay, as there is not data in this published map format that can be searched for with a query. See also Tygron Query Language
To better illustrate 'How to use' these ArcGIS terrains, we will look at a specific example; the flooding issues in Lower Manhattan. As the Sandy flooding has been well documented, searching for relevant data is not very difficult.

How to import ArcGIS terrains

File:QueriesForLayerArcGISImport-Q3-2015.jpg
Clauses from the NFHL feature service from Fema
We will import a terrain based on the National Flood Hazard Layer (NFHL) from the Federal Emergency Management Agency (Fema) for New York City. The searchable query is ZONE_SUBTY (Zone Subtype) and we search for the flood hazard of one flooding per 500 years. For this we use the clauses 'AREA OF MINIMAL FLOOD HAZARD' and '0.2 PCT ANNUAL CHANCE FLOOD HAZARD'.
This results in the following query:
ZONE_SUBTY='AREA OF MINIMAL FLOOD HAZARD' OR ZONE_SUBTY='0.2 PCT ANNUAL CHANCE FLOOD HAZARD'
Please note that when querying a text string, enclosing quotation marks are required around these text strings (see example). When querying for a numerical value, these quotation marks are redundant.
As the searched for data in our example has been published by Fema as a public feature service, logging in to an ArcGIS account is not required. This being said, when using a custom made feature service that is not intended for public use (confidential information or intellectual property for instance), logging into ArcGIS is required to access private data sets that are only visible within the organisation.


How to import ArcGIS terrains:
  1. Load or create a project based on real data, situated in the area for which an ArcGIS terrain (feature service) is available
  2. Log in with ArcGIS credentials on the top right side of the Tygron Editor window (for private feature services only)
  3. Select 3D World > Terrains > Import terrain from ArcGIS
  4. Enter 'National Flood Hazard Layer' in the search bar of the newly opened Esri Import panel
  5. Highlight any suitable layer that appears as search result
  6. Ensure the correct Feature Sevice Layer is selected ('Flood Hazard Zones', should be by default)
  7. Select the appropriate field > 'ZONE_SUBTY'
  8. Specify layer features with an appropriate query
  9. Select 'SAFE_ZONE' from the drop down list to designate the imported terrain type as a protected area
  10. Add the terrain to start the import process
  11. The new terrain is now imported, and can be edited. Under the mini map a new icon for the overlay has appeared



Terrain imported as GeoJSON file

When a specific terrain data set is available for your project and, for any reason, the ArcGIS method is not desirable, it is also possible to upload the terrain data directly into the project. For this, the data needs to be available in GeoJSON format. To convert shapefiles into this format, a third party GIS editor tool is required. The ArcGIS desktop module is capable to do so, however, free tools such as QGIS also perform the task. QGIS (Quamtum GIS) is a free and open source tool we suggest and use in the below example, however, other tools (openjump, FreeGIS, etc) are also freely available, but are not (yet) tested by Tygron.


How to import Terrains as GeoJSON file

To better illustrate how to import GIS data as terrain in the GeoJSON format into a project, we will describe the use case of importing a noise contour terrain and overlay in a project in Amsterdam, using freely available data from the Amsterdam Municipality and QGIS to convert the shape file to GeoJSON.
How to convert a terrain data shape file into GeoJSON format:
  1. Have the GIS data shape file locally available
  2. Open a new QGIS project and drop the shapefile (.zip folder) into the main editor panel
  3. If the file contains multiple vector layers, select the desired layers (or select all) on the newly opened window
  4. Now the file is visualized on the main view panel of QGIS, while a new panel shows a list of imported layers on the left of the main view panel
  5. Right-click on the desired layer to export, and select 'save as' (It is possible to select multiple layers together)
  6. Select GeoJSON as format, enter a suitable name and target location, and ensure that 'EPGS:3857 - WGS 84/ Pruedo Mercator' is selected as CRS style
  7. The newly created GeoJSON file now appears on the left side, as new layer, and on the target location


How to import a GeoJSON file as terrain in the Tygron enditor:
  1. Open the Tygron Editor and create or load a project for the selected area
  2. Drag and drop the new GeoJSON file anywhere on the editor window
  3. When a new panel asks what to do with the file, select to import as a terrain
  4. Another new panel now asks for certain features to be set, such as 'Merge polygons' and which layer features to filter
  5. The Values button displays an information panel with all available values for the selected layer feature
  6. Enter one value and select Send, a new terrain is now imported, with a polygon of one piece and depicting the selected value
  7. Repeat the process for each desired consecutive value for the selected feature layer
  8. Rename the imported terrains to a more logical name, this name will also appear in the legend of the terrain overlay (see below)
  9. Select an appropriate color for the just created terrain layer


How to make an overlay for a GeoJSON file based terrain in the Tygron editor:
  1. Open the Tygron Editor and load the project for the selected area
  2. Select 3D World > Overlays > Edit Overlays
  3. On the left side, select to add a new 'terrain'
  4. Select the newly added terrain from the list
  5. Rename the new overlay with a suitable name on the right side panel
  6. Check the selection boxes of the desired terrains from the list on the right side. A new overlay icon and legend will appear in the editor main view
  7. The new overlay is now selectable, showing all colored terrain layers in one image