Difference between revisions of "Geog Heightfield Load"

From Terragen Documentation from Planetside Software
Jump to: navigation, search
(Added screenshot)
m (Updated description in Overview section for formats that Terragen supports.)
 
(One intermediate revision by the same user not shown)
Line 1: Line 1:
[[File:geog-heightfield-load.png|400px|center]]
+
[[File:geog-heightfield-load.png|none|470px|Geog Heightfield Load]]
  
'''Node Description and Purpose:'''<br />
+
 
 +
== Overview ==
 
The Geog heightfield load node can load and georeference digital elevation map (DEM) files. It supports many formats and projections. Geog heightfield load nodes can be created using the "Heightfield (load DEM)" item in the Add Terrain button menu at the top of the Terrain node list.
 
The Geog heightfield load node can load and georeference digital elevation map (DEM) files. It supports many formats and projections. Geog heightfield load nodes can be created using the "Heightfield (load DEM)" item in the Add Terrain button menu at the top of the Terrain node list.
  
You can see a list of the supported DEM formats supported by the node [http://www.gdal.org/formats_list.html here]. Terragen supports all of the formats which have "Yes" in the "Compiled by default" column of the table on that page. Most commonly used DEM formats are supported. Please note that not all of the supported formats have been tested, there are a lot of them and some are quite obscure.
+
You can see a list of the supported DEM formats supported by the node [http://www.gdal.org/formats_list.html here]. Terragen supports all of the formats which have "Built-in by default" in the "Build requirements" column of the table on that page. Most commonly used DEM formats are supported. Please note that not all of the supported formats have been tested as there are many of them and some are quite obscure.
  
You may notice that Terragen's TER terrain file format (.ter) is listed in the supported formats. However we recommend that you use a [[Heightfield Load]] node to load Terragen terrains, because that uses Terragen's native file loading.
+
You may notice that Terragen's TER terrain file format (.ter) is listed in the supported formats. However we recommend that you use a [[Heightfield Load]] node to load Terragen terrains, because it uses Terragen's native file loading.
  
 
DEMs often come as a collection of files. If you're not familiar with the DEM format you may need to experiment to see which file to open. A reasonable guess often seems to be to choose the largest file.
 
DEMs often come as a collection of files. If you're not familiar with the DEM format you may need to experiment to see which file to open. A reasonable guess often seems to be to choose the largest file.
  
Georeferencing settings are only available in the Professional edition. However the correct size for the DEM will still be calculated based on georeferencing if needed. Without the georeferencing settings the position of the DEM will be controlled by the [[Heightfield Shader]] the Geog heightfield load node is attached to.
+
This node allows you to replace NODATA values with a different value. NODATA values indicate areas in the DEM without valid data, which can often give the appearance of holes and similar in the terrain. Terragen's [[The Library|Library]] previews for DEMs show NODATA areas drawn in red.
 +
 
 +
The node uses [http://www.gdal.org GDAL] and [https://trac.osgeo.org/proj/ PROJ.4] to load and georeference DEM files.
 +
 
  
When you use a georeferenced DEM and the '''Georeference''' parameter is checked it will be placed at the correct position on the planet. However accuracy falls away as you move away from the origin of the planet, which corresponds to 0&deg; latitude, 0&deg; longitude or the Prime Meridian at the Equator. To ensure the best accuracy it's suggested that you move the planet origin to the area you're interested in. It's easy to do this. Let's say you've loaded a DEM and it's georeferenced. We'll move the planet origin so that it's at the southwest corner of the DEM. Follow these steps:
+
== How to use ==
 +
Georeferencing settings are only available in the Professional edition of Terragen. However the correct size for the DEM will still be calculated based on georeferencing if needed. Without the georeferencing settings the position of the DEM will be controlled by the [[Heightfield Shader]] the Geog heightfield load node is attached to.
 +
 
 +
When you use a georeferenced DEM and the "Georeference" setting is checked it will be placed at the correct position on the planet. However accuracy falls away as you move away from the origin of the planet, which corresponds to 0&deg; latitude, 0&deg; longitude or the Prime Meridian at the Equator. To ensure the best accuracy we recommend that you move the planet's origin to the area you're interested in. For example, here are the steps to move the planet's origin to the southwest corner of the DEM:
  
 
<ol>
 
<ol>
 +
<li> Load your georeferenced DEM.
 
<li>
 
<li>
Click the copy/paste button (clipboard icon) at right of the '''SW corner lat long''' parameter.
+
Click the copy/paste button (clipboard icon) at right of the "SW corner lat long" setting.
 
</li><li>
 
</li><li>
Choose "Copy coordinates" from the menu which pops up. This will copy the lat/long values from both text fields at the same time.
+
Choose "Copy coordinates" from the popup menu. This will copy the lat/long values from both text fields at the same time.
 
</li><li>
 
</li><li>
Open the parameter view for the Planet 01 node (the default planet object). You can find this in the Objects node list or double click on the node in the network view.
+
Open the Node Properties pane for the Planet 01 node (the default planet object). You can find this in the Objects node list or double click on the node in the network view.
 
</li><li>
 
</li><li>
Paste the values into the planet's '''Lat long at apex''' parameter. You should use the copy/paste button for this again. Click the button and choose "Paste coordinates".
+
Paste the values into the planet's "Lat long at apex" setting by clicking the copy/paste button at the right of the setting and choosing "Paste coordinates".
 
</li>
 
</li>
 
</ol>
 
</ol>
  
Those steps move the planet origin to the area you're interested and should ensure the best results.
+
Following these steps will move the planet's origin to the area you're interested in, and should ensure the best results.
 
 
The node allows you to replace NODATA values with a different value. NODATA values indicate areas in the DEM without valid data, which can often give the appearance of holes and similar in the terrain. [[The Library|Library]] previews for DEMs show NODATA areas drawn in red.
 
 
 
The node uses [http://www.gdal.org GDAL] and [https://trac.osgeo.org/proj/ PROJ.4] to load and georeference DEM files.
 
 
 
 
 
'''Node Type:''' Heightfield Operator<br />
 
  
  
 
'''Settings:'''<br />
 
'''Settings:'''<br />
  
* '''Filename:''' This parameter lets you specify the DEM file to be loaded. Click the File button on the right to open a file chooser dialog.
+
* '''Filename:''' This setting lets you specify the DEM file to be loaded. Click the File button on the right to open a file chooser dialog.
 
* '''Replace NODATA values:''' If this is checked any NODATA values in the DEM will be replaced with the value specified in the replacement value field to the right.
 
* '''Replace NODATA values:''' If this is checked any NODATA values in the DEM will be replaced with the value specified in the replacement value field to the right.
 
* '''Set to Min Height:''' Pressing this button well set the NODATA numeric entry field to a value equal to the lowest height found in the imported DEM file.  
 
* '''Set to Min Height:''' Pressing this button well set the NODATA numeric entry field to a value equal to the lowest height found in the imported DEM file.  
* '''Update button:''' If you change the NODATA replacement value in the field to the left you will need to click this button to update the DEM with the new replacement values. The button is only available if '''Replace NODATA values''' is checked.
+
* '''Update button:''' If you change the NODATA replacement value in the field to the left you will need to click this button to update the DEM with the new replacement values. The button is only available if "Replace NODATA values" is checked.
  
  
 
The following georeferencing settings are only available in the Professional edition:
 
The following georeferencing settings are only available in the Professional edition:
 +
 +
 
<ul>
 
<ul>
 
<li>
 
<li>
 
'''Georeference:''' If this is checked the heightfield will be georeferenced according to the settings in the fields below. If you uncheck this the position of the DEM will be controlled by the [[Heightfield Shader]] this node is attached to. The DEM will still be the correct size (according to values derived from the file).
 
'''Georeference:''' If this is checked the heightfield will be georeferenced according to the settings in the fields below. If you uncheck this the position of the DEM will be controlled by the [[Heightfield Shader]] this node is attached to. The DEM will still be the correct size (according to values derived from the file).
 
</li><li>
 
</li><li>
'''Auto georeference from file:''' If this is checked the node tries to load georeferencing information for the DEM. This is on by default so when you a create a new node and choose a file the georeferencing information will be loaded automatically. If the node finds georeferencing information when it loads the file it also turns on the '''Georeference''' parameter. Please note that this also means that the georeferencing information will be read when the node loads as part of a project being opened. If you turn off the '''Georeference''' parameter you should also turn off '''Auto georeference from file''' or '''Georeference''' will be turned back on again when the project loads.
+
'''Auto georeference from file:''' If this is checked the node tries to load georeferencing information for the DEM. This is on by default so when you a create a new node and choose a file the georeferencing information will be loaded automatically. If the node finds georeferencing information when it loads the file it also turns on the "Georeference" setting. Please note that this also means that the georeferencing information will be read when the node loads as part of a project being opened. If you turn off the "Georeference" setting you should also turn off "Auto georeference from file" or the "Georeference" setting will be turned on again when the project loads.
  
If you make changes to the georeferencing values this parameter is turned off.
+
If you make changes to the georeferencing values this setting is turned off.
 
</li><li>  
 
</li><li>  
 
'''NW corner lat long:''' This sets the latitude and longitude of the northwest corner of the heightfield.
 
'''NW corner lat long:''' This sets the latitude and longitude of the northwest corner of the heightfield.
Line 67: Line 70:
 
<ul>
 
<ul>
 
<li>
 
<li>
'''XY Size (metres):''' This param displays the size of the DEM in metres, as loaded from the file. If the size can't be derived from the DEM data directly it will be calculated based on georeferencing information.
+
'''XY Size (metres):''' This setting displays the size of the DEM in metres, as loaded from the file. If the size can't be derived from the DEM data directly it will be calculated based on georeferencing information.
  
This parameter is read only, however you can select and copy values from it.
+
This setting is read only, however you can select and copy values from it.
 
</li><li>
 
</li><li>
'''XY Size (points):''' This the number of points in each direction of the DEM. This parameter is read only, however you can select and copy values from it.
+
'''XY Size (points):''' This setting is the resolution or number of points in each direction of the DEM. This setting is read only, however you can select and copy values from it.
 
</li><li>
 
</li><li>
'''Height Range:''' This field displays height information about the heightfield. It shows the minimum height, maximum height and the height range. The height range is the minimum height subtracted from the maximum height.
+
'''Height Range:''' This field displays the minimum and maximum heights and the height range from the heightfield. The height range is the minimum height subtracted from the maximum height.
 
</li><li>
 
</li><li>
'''DEM information field:''' This text field displays the following information about the DEM:<br>
+
'''DEM information field:''' This text field displays the following information about the DEM.  The setting is read only, however you can select and copy values from it.<br>
 
<ul>
 
<ul>
 
<li>
 
<li>
Line 85: Line 88:
 
</li>
 
</li>
 
</ul>
 
</ul>
This parameter is read only, however you can select and copy values from it.
+
 
 
</li>
 
</li>
 
</ul>
 
</ul>

Latest revision as of 23:08, 4 February 2021

Geog Heightfield Load


Overview[edit]

The Geog heightfield load node can load and georeference digital elevation map (DEM) files. It supports many formats and projections. Geog heightfield load nodes can be created using the "Heightfield (load DEM)" item in the Add Terrain button menu at the top of the Terrain node list.

You can see a list of the supported DEM formats supported by the node here. Terragen supports all of the formats which have "Built-in by default" in the "Build requirements" column of the table on that page. Most commonly used DEM formats are supported. Please note that not all of the supported formats have been tested as there are many of them and some are quite obscure.

You may notice that Terragen's TER terrain file format (.ter) is listed in the supported formats. However we recommend that you use a Heightfield Load node to load Terragen terrains, because it uses Terragen's native file loading.

DEMs often come as a collection of files. If you're not familiar with the DEM format you may need to experiment to see which file to open. A reasonable guess often seems to be to choose the largest file.

This node allows you to replace NODATA values with a different value. NODATA values indicate areas in the DEM without valid data, which can often give the appearance of holes and similar in the terrain. Terragen's Library previews for DEMs show NODATA areas drawn in red.

The node uses GDAL and PROJ.4 to load and georeference DEM files.


How to use[edit]

Georeferencing settings are only available in the Professional edition of Terragen. However the correct size for the DEM will still be calculated based on georeferencing if needed. Without the georeferencing settings the position of the DEM will be controlled by the Heightfield Shader the Geog heightfield load node is attached to.

When you use a georeferenced DEM and the "Georeference" setting is checked it will be placed at the correct position on the planet. However accuracy falls away as you move away from the origin of the planet, which corresponds to 0° latitude, 0° longitude or the Prime Meridian at the Equator. To ensure the best accuracy we recommend that you move the planet's origin to the area you're interested in. For example, here are the steps to move the planet's origin to the southwest corner of the DEM:

  1. Load your georeferenced DEM.
  2. Click the copy/paste button (clipboard icon) at right of the "SW corner lat long" setting.
  3. Choose "Copy coordinates" from the popup menu. This will copy the lat/long values from both text fields at the same time.

  4. Open the Node Properties pane for the Planet 01 node (the default planet object). You can find this in the Objects node list or double click on the node in the network view.

  5. Paste the values into the planet's "Lat long at apex" setting by clicking the copy/paste button at the right of the setting and choosing "Paste coordinates".

Following these steps will move the planet's origin to the area you're interested in, and should ensure the best results.


Settings:

  • Filename: This setting lets you specify the DEM file to be loaded. Click the File button on the right to open a file chooser dialog.
  • Replace NODATA values: If this is checked any NODATA values in the DEM will be replaced with the value specified in the replacement value field to the right.
  • Set to Min Height: Pressing this button well set the NODATA numeric entry field to a value equal to the lowest height found in the imported DEM file.
  • Update button: If you change the NODATA replacement value in the field to the left you will need to click this button to update the DEM with the new replacement values. The button is only available if "Replace NODATA values" is checked.


The following georeferencing settings are only available in the Professional edition:


  • Georeference: If this is checked the heightfield will be georeferenced according to the settings in the fields below. If you uncheck this the position of the DEM will be controlled by the Heightfield Shader this node is attached to. The DEM will still be the correct size (according to values derived from the file).
  • Auto georeference from file: If this is checked the node tries to load georeferencing information for the DEM. This is on by default so when you a create a new node and choose a file the georeferencing information will be loaded automatically. If the node finds georeferencing information when it loads the file it also turns on the "Georeference" setting. Please note that this also means that the georeferencing information will be read when the node loads as part of a project being opened. If you turn off the "Georeference" setting you should also turn off "Auto georeference from file" or the "Georeference" setting will be turned on again when the project loads.

    If you make changes to the georeferencing values this setting is turned off.

  • NW corner lat long: This sets the latitude and longitude of the northwest corner of the heightfield.

  • NE corner lat long: This sets the latitude and longitude of the northeast corner of the heightfield.

  • SE corner lat long: This sets the latitude and longitude of the southeast corner of the heightfield.

  • SW corner lat long: This sets the latitude and longitude of the southwest corner of the heightfield.


Statistics

  • XY Size (metres): This setting displays the size of the DEM in metres, as loaded from the file. If the size can't be derived from the DEM data directly it will be calculated based on georeferencing information. This setting is read only, however you can select and copy values from it.
  • XY Size (points): This setting is the resolution or number of points in each direction of the DEM. This setting is read only, however you can select and copy values from it.

  • Height Range: This field displays the minimum and maximum heights and the height range from the heightfield. The height range is the minimum height subtracted from the maximum height.

  • DEM information field: This text field displays the following information about the DEM. The setting is read only, however you can select and copy values from it.

    • Raster band units: This is the units used (metres, feet etc.) for the dimensions of the first raster band in the DEM.
    • NODATA value: This shows the value which is used for NODATA values in the DEM.

    • Coordinate system: This shows the coordinate system which is being used to georeference the DEM. The coordinate system is displayed using the OpenGIS Well Known Text format.


A heightmap or heightfield is an array of height values, usually in a grid which describe the height at specific points in a defined area. Heightfields are used to represent real-world and virtual terrain in a specific, easily converted format. Most heightfields can be represented as simple image data in grayscale, with black being minimum height and white being maximum height.

DEM stands for Digital Elevation Model (or Map). A DEM is similar to a heightfield. DEMs are normally generated from real world measurements of a planet's surface, for example Earth or Mars.

The Node List is a part of the Terragen interface that shows a list of nodes along the left side of the application window. The Node List generally shows only those nodes that are relevant to the current Layout (e.g. Terrain, Atmosphere). It sometimes includes buttons or other controls that are specific to a particular Layout as well. The Node List is hierarchical and each level is collapsible.