About Us Customers

 uniDEM

Tutorials
User Manual Videos

Water Flattening

uniDEM Water Flattening

This tutorial describes how to identify, classify and flatten water which often has height errors or is missing (void) from most sensors using ancillary imagery.

Prior to commencing a project perform the following steps.

Review the Getting Started tutorials to learn more about loading and interacting with data using uniDEM.

This lesson will take approximately 10 minutes.

The following video executes the steps in the tutorial.

1. Load and View DSM

  1. Click uniDEMlogoLoad DEM
  2. Open bostonDSM-1m.tif
  3. Display "bostonDSM-1m" in the View
  4. Turn colors off in shader by clicking into view and press "H"
  5. Click uniDEMlogoLoad Image
  6. Open boston1m-Image.tif
  7. Press Ctrl-N to make a new View
  8. Press Ctrl-T to align Views
  9. Click into right view and display boston1m-Image
  10. Select bostonDSM-1m
boston set up

Help references:

Load DEM | Load Image | New Window (Ctrl-N) | Tile Windows (Ctrl-T)

2. Classify Water

Water identification and flattening is required to ensure consistent elevations and to fill missing data from the collection process as required by the DEM specification.
The Classification Mask is created to align spatially with the DSM being edited the first time a mask value is assigned.

Flood Fill using Imagery

  1. Press "F" to enable the Flood Fill tool
  2. Mouse over the water visible in the orthophoto, hold Shift + Left Click
  3. Within 1000m of the pixel click water is selected
  4. Continue clicking other water areas until most of the water is selected
flood fill classify water

Assign Selection to Water

  1. Within the Classification tab Click 8 (Ocean)
  2. Click Yes to create a new CLASS mask
  3. Hit Esc key to clear the selection mask
  4. Click into the left View
  5. Check the CLASS layer in the bostonDSM-1m dataset
Observe: The class mask displays classifications for Ocean (blue) and Unknown (gray) over the DEM.
classify ocean in dem

Help references:

Flood Fill | Flood Fill Options | Classification Shortcuts

3. Clean-up Classification

Some water regions will contain features that do not match the selection such as waves, boats and small land. If completely surrounded by water these feature can be removed to "clean up" the water classification.

  1. Within the Classification tab click Select By Class
  2. Select the bostonDSM-1m dataset
  3. Select Ocean (20) classification
  4. Within the Selection tab click Cleanup
  5. Select "Remove small holes"
  6. Select "8-way" connectivity and click OK
  7. Enter "500" to remove any holes in the selection <500m2
  8. Within the Classification tab Click 8 (Ocean)
  9. Hit Esc key to clear the selection mask
Observe: The boats within the orthoimage are added to the Ocean classification.
clean up classification

Help references:

Select By Class | Clean Up | Classification Shortcuts

4. Flatten Water

Standing water such as an Ocean or Lake need to be edited to a single elevation. Water can be set manually or as a function of shoreline height. Both methods are presented.

Manually Set Water Height

  1. Within the Classification tab click Select By Class
  2. Select the bostonDSM-1m dataset
  3. Select Ocean (20) classification
  4. Within the DEM tab click Set To
  5. Enter 0 (m) to set all selected Ocean to 0m
  6. Hit Esc key to clear the selection mask
Observe: All pixels classified as Ocean are set to an elevation of 0m.
flatten water

Set Water Height using Perimeter (Shoreline Heights)

  1. Within the Classification tab click Select By Class
  2. Select the bostonDSM-1m dataset
  3. Select Ocean (20) classification
  4. Press "V" key to void all water
  5. Within the DEM tab click Perimeter
  6. Click OK to user Percentile algorithm
  7. Enter "10" for the elevation percentile to use for the shoreline
  8. Click OK to "Fill all voids" including edges
Observe: Observe each discrete water body is set to an independent elevation based on the height of the 10th percentile of the water bodies shoreline heights.
flatten water using shoreline height

Help references:

Select By Class | Set To | Make Void (V) | Perimeter Void Fill

4. Adjust Shorelines

Many derivative products such as Contours and flood modelling require land to be equal to or higher then neihbouring water pixels.

  1. Press Ctrl-A to select all pixels
  2. Within Classification tab click Enforce Boundaries
  3. Enter 1.0 raise all elevations by 1.0m in Group 2 (land types) is lower than Group 1
  4. Click Hydro to separate groups 1 and 2
  5. Hit Esc key to clear the selection mask
Observe: All pixels that are of classs Unknown are now equal to of above the height of the Ocean
contain water

Help references:

Select By Class | Enforce Boundaries