May 14, 2024

Terrain Painting in the Path Profile View

Written by: Amanda Lind

 

Terrain Painting is a popular (and fun) tool for performing landscape manipulation in grid layers. This tool is often used to model future ground construction, remove imperfections in the data, fill holes, and much more. In Global Mapper Pro version 25.1, Terrain Painting functionality was added to the Path Profile tool. Editing data from within the line graph of the Path Profile viewer provides the added benefit of displaying the elevation of the data you are working on. 

The functionalities are still the same as the original Terrain Painting tool, but the Path Profile tool provides the ability to measure and visualize the terrain changes while working from an additional, perpendicular perspective. You can even limit the view to swaths, or slices of the data based on distance. The terrain edits are applied to the layer in the same way as the regular Terrain Paint tool, even in the areas that aren’t visible in the Path Profile window.

Path Profile Toolbar Icons
Use the Terrain Paint button from the Path Profile toolbar.

Useful Things to Know:

  • All data within the specified Brush Size will be edited even if it isn’t currently displayed in the Path Profile Viewer. 
  • You can keep an eye on the 2D workspace to watch your cursor track the edits being applied in the Profile window. 
  • This tool only paints within the Path Profile viewer. To paint in the workspace, use the original Terrain Paint tool found in the Analysis toolbar or the Terrain Analysis menu. 
  • Tip: Use the measure tool to measure the exact desired slope for the Slope Along/Across Line options.
  • The Terrain Paint cursor in the Path Profile window is the same as the main tool’s circle cursor but as seen from a perpendicular perspective:
    The cursor used in the terrain paint too in path profile is a line with buffers marked by color.
    The black dot is the center, the red area is the Brush Size, and the blue is the Feathering Size.

    Operation Examples and Explanations:

    Slope Options

    Slope direction comparison in Global Mapper
    Slopes can be created in 2 directions: along a line, and across a line.

    Slope Terrain Along Line: 

    This operation changes the elevation to match the specified slope along the drawn line. The terrain will slope up (positive slope) or down (negative slope) from the first vertex toward the end of the line at the specified slope value. The starting height is derived from the first vertex of the line. One example is creating a highway ramp by starting the line at the existing highway surface and using a negative slope to draw the lines along the center-line of the new ramp location to slope the terrain down at the specified grade. Another example below illustrates how to clean irregularities out of data.

This line is drawn along here the perpendicular perspective is used to smooth cars off of the road using the slope value measured in that path profile tool.

Slope Terrain Across Line:

This operation changes the elevation to match the specified slope perpendicularly from the drawn line. The slope is drawn from the middle of the line out to the left, right, or both sides, as determined by settings.

For example, the below transition from the road into the surrounding terrain should have a 10-degree slope. The Slope Across Line function can accomplish this with a single line feature. The Line Side setting (left or right )is determined from the start of the drawn line. When determining line side and positive or negative grade, it’s helpful to pretend you’re standing at the start of the line looking down it. In this example, the start of the line feature is at the top of the map, and the Line Side is set to Left based on that perspective. The slope is downhill, so the slope value is negative.

Tip: To determine the beginning of a line you can either check the features vertex list, or draw the line, assess the results, then undo and change your settings accordingly. 

Painting slope off the edge of a road layer
The Slope Terrain Across Line function was used to add a 3ft long slope at -10 degrees off of the road edge.

Fill Holes 

The fill holes setting populates new grid cell values based on the surrounding data. Using this function through the Path Profile tool provides the ability to immediately see what new elevation values are being populated without having to judge color, or use the feature info tool. 

Tip: The default settings in the path profile tool include the “interpolate elevations to Fill No Data Regions”. Before working with holes, or regions of no data, in your raster, it’s advised to first disable this functionality from the Data Display tab of the path profile settings. 

Holes filed in Terrain layer
Lidar is known for missing or misrepresenting water features. The fill holes function can be used to repair these holes in raster layers that were generated from lidar.

Set to “No Data” 

The opposite of the Fill Holes function, Set to No Data creates gaps in the terrain by removing data from the designated area. This function can be useful for creating holes where you want another layer to shine through. For removing data inside of or around polygons, see the Cropping tab in Raster Layer Options

Smooth 

The Smoothing functionality performs a focal average for all of the cells inside the brush area. It alters the elevation values for the pixels within the area, based on the specified box size. By default, the box size is set to 5×5 grid cells, so each cell within the brush area is altered based on the average elevation within the 5×5 neighborhood surrounding that specific cell. 

Smoothing a rough terrain layer
Here, the Smooth function is being applied to a road in a rough/bumpy terrain layer.

Raise Terrain and Lower Terrain 

These opposing options add or subtract elevation to the existing value. If you’d like to maintain the terrain slope or structure while shifting it up or down by a set distance, this is the tool to use. 

Below, a path along a canal is raised half a meter using the line brush and the Raise Terrain operation. This altered terrain will impact further analysis of the terrain, like with the watershed and flooding simulation tools. When viewed in 3D, the feathering between the flatter raised path and the nearby terrain is clearly visible. The feathering creates a more realistic bank and prevents an abrupt dropoff from the altered values to the nearby unedited values.

Set Terrain Height  

Set Terrain Height applies a specific elevation within the brush extent. Unlike the Raise and Lower terrain options, this operation overwrites the existing elevation with the defined height value. This operation can be used to flatten an area of terrain and fill in gaps in the data. 

For example, to build this bridge in the 2D viewer, you would need to take samples of the elevation from either side. In the path profile tool, you can clearly see the edges of the ravine, and identify the elevation at the slope where you want the bridge to begin. 

A bridge created in a terrain layer
Set Terrain height was used to create a dam across a river at about 2620m in elevation.

Revert to Original Heights

Revert to Original Heights undoes any changes made to the terrain and will revert the pixel elevations to their original values. Revert to Original heights allows you to undo all actions that were applied in a specified area. To undo sequential changes done to the layer as a whole, use the Undo button at the bottom of the dialog. 

Tip: Because Terrain Painting has its own undo functionality, it isn’t tracked by Global Mapper’s separate Undo tool, so you must use the undo and redo options available within the Terrain Painting window.

Try the Terrain Painting tool in Global Mapper Pro with a free 14-day trial! If you have any questions, please contact us.

Companies using Blue Marble’s geospatial technology