Geog Heightfield Load

From Terragen Documentation from Planetside Software
Jump to: navigation, search
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.