GRASS logo

NAME

p.slope.planet - Compute slope and aspect for a planetary DEM.
Calculates slope (steepest descent angle from horizontal) and aspect (compass direction of steepest descent) using spherical arc-length distances between pixels. This is more accurate than r.slope.aspect for planetary bodies where the latitude-dependent arc lengths differ significantly. Input DEM must be in height above reference sphere [m or km]. Mean radius is used for arc-length scaling.

KEYWORDS

Planetary, Terrain Analysis, terrain, slope, aspect

SYNOPSIS

p.slope.planet
p.slope.planet --help
p.slope.planet elevation=name [slope=name] [aspect=name] [radius=float] [format=string] [--overwrite] [--help] [--verbose] [--quiet] [--ui]

Flags:

--overwrite
Allow output files to overwrite existing files
--help
Print usage summary
--verbose
Verbose module output
--quiet
Quiet module output
--ui
Force launching GUI dialog

Parameters:

elevation=name [required]
Input DEM raster
slope=name
Output slope raster [degrees]
aspect=name
Output aspect raster [degrees, N=0, E=90]
radius=float
Mean planetary radius [same units as DEM heights]
Default: 3390.0
format=string
Slope output format
Options: degrees, radians, percent
Default: degrees

Table of contents

DESCRIPTION

p.slope.planet computes slope and aspect on a planetary DEM, accounting for the target body's spherical/ellipsoidal shape. Unlike r.slope.aspect, which assumes a flat (Euclidean) geometry, p.slope.planet corrects for surface curvature using the planet's equatorial radius a and polar radius b (computed from flattening = (a−b)/a).

The slope is the angle in degrees between the surface normal and the local vertical. Aspect is the azimuth of the downslope direction, measured clockwise from north.

Pixel resolution in metres/pixel must be specified with ew_res and ns_res (or a single res). For map-projected DEMs these are typically read from the raster metadata.

NOTES

A 3×3 central-difference kernel is used. Edge pixels are set to NULL. For very small bodies (radius < 100 km) the curvature correction is significant; for Moon-sized and larger bodies it has negligible effect at typical DEM resolutions.

EXAMPLES

Compute slope and aspect of Mars MOLA DEM:

p.slope.planet input=mola_dem \
    a=3396190 flattening=0.00589 res=463 \
    slope=mola_slope aspect=mola_aspect

REFERENCES

SEE ALSO

p.dem.prep, p.shadow.planet, r.slope.aspect

AUTHOR

Yann Chemin

SOURCE CODE

Available at: p.slope.planet source code (history)

Accessed: Sunday Nov 15 11:06:07 2026


Main index | Paint index | Topics index | Keywords index | Graphical index | Full index

© 2003-2026 GRASS Development Team, GRASS 8.5.1dev Reference Manual