Getting started

Understanding DEM metadata and NoData

Read a DEM's size, cell size, data type, compression, coordinate system and NoData value in the Info tab, and fix a missing or wrong NoData value.

Beginner6 min readChapter 5 of 35

You will learn

  • Read the file, georeferencing and NoData sections of the Info tab.
  • Understand what NoData cells are and how Orbis3D treats them.
  • Set or change the NoData value.

Prerequisites

Data for this tutorial

Sample valley DEM (synthetic) Download orbis3d-sample-valley.tif

Format
GeoTIFF, 1 band, Float32, Deflate, tiled
CRS
EPSG:32643 (WGS 84 / UTM zone 43N)
Content
Elevations 419.5 to 1452.5 m; NoData -9999 in the south-west corner
In Orbis3D
Data panel ▸ Sample data ▸ Sample valley DEM (synthetic) ▸ Load
Licence
Synthetic, CC0 1.0

Synthetic samples are CC0 1.0; the SRTM sample is public domain. About the datasets

The task

Before you trust any analysis you should know what you loaded: how large the raster is, how big each cell is on the ground, which coordinate system it uses and which cells have no data.

Steps

  1. Load the sample valley (Data ▸ Sample data ▸ Sample valley DEM ▸ Load).
  2. Open the Info tab of the right panel.
  3. Read the File section: format GeoTIFF, 480 × 360 cells, 1 band, data type Float32, compression Deflate, layout Tiled 256 × 256.
  4. Read Georeferencing: CRS WGS 84 / UTM zone 43N (EPSG:32643), projected, unit metre, read from the GeoTIFF GeoKeys; origin (top-left corner) 412,000, 2,525,400; cell size 30 × 30 m. Because UTM can be converted to latitude and longitude, the extent is also given in degrees.

The Info tab with the file and georeferencing sections
File and georeferencing details of the sample valley.

  1. Scroll to NoData. The NoData value is -9999, declared in the file, and 2,415 of 172,800 cells (1.4 %) are NoData.

The NoData section with the value, its source and the number of NoData cells
The NoData section and the start of the statistics.

What NoData means

NoData marks cells without a valid elevation: outside the surveyed area, under water, or where a sensor failed. The value itself, often -9999 or -32768, is a code, not a height. Orbis3D:

  • leaves NoData cells out of the 3D surface, so the terrain has a hole or a cut edge there;
  • excludes them from statistics, histograms and every analysis;
  • gives NoData to slope, aspect and hillshade cells whose neighbourhood is incomplete, unless Compute edges is on (it fills missing neighbours the way gdaldem -compute_edges does).

Setting or changing NoData

Some files store NoData cells as a plain number without declaring it. A DEM with a frame of 0 values around the data is a typical case: the zeros pull the minimum down and show up as a cliff.

  1. In Info ▸ NoData, type the value in Use as NoData, for example 0.
  2. Click Apply. The layer is read again with that value as NoData.
  3. To go back to the file's own value, click Use the file's NoData value.
## Expected result

You know the raster's size, cell size, coordinate system and NoData value. The statistics below the NoData section count only valid cells: minimum 419.52 m and maximum 1,452.50 m for the sample valley.

Common mistakes

  • Treating -9999 as an elevation. If the minimum elevation is -9999 or -32768, the NoData value is not declared. Set it as described above.
  • Ignoring the CRS notes. A yellow note in Units and scale means part of the coordinate system was assumed. Check it before measuring anything; see Coordinate systems and units.