Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

GDAL DEM Processing Routines #456

Merged
merged 14 commits into from
Nov 28, 2023
2 changes: 2 additions & 0 deletions src/raster/processing/dem/mod.rs
metasim marked this conversation as resolved.
Show resolved Hide resolved
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,8 @@
//! * [`topographic_position_index()`]
//!

#![deny(missing_docs)]
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍


use std::ffi::{CStr, CString};
use std::path::Path;
use std::ptr;
Expand Down
9 changes: 9 additions & 0 deletions src/raster/processing/dem/options.rs
Original file line number Diff line number Diff line change
Expand Up @@ -38,12 +38,19 @@ impl Drop for GdalDEMProcessingOptions {
/// DEM processor mode, to stringify and pass to [`gdal_sys::GDALDEMProcessing`].
#[derive(Debug, Clone, Copy)]
pub enum DemAlg {
/// Computes the azimuth that the slopes in some DEM data are facing.
Aspect,
/// Uses a configuration file to colorized a DEM dataset.
ColorRelief,
/// Performs hill-shade rendering of DEM data.
Hillshade,
/// Computes the roughness from DEM data, which is the largest difference between the central pixel and its surrounding cells.
Roughness,
/// Computes slope values from DEM data.
Slope,
/// Computes the Topographic Position Index from DEM data, which is the difference between the central pixel and the mean of its surrounding cells.
Tpi,
/// Computes the Topographic Roughness Index from DEM data, which measures the difference between the central pixel and the surrounding cells.
Tri,
}

Expand All @@ -67,7 +74,9 @@ impl DemAlg {
/// whereas `Horn` performs better on rougher terrain.
#[derive(Debug, Clone, Copy)]
pub enum DemSlopeAlg {
/// The Horn's formula, which performs better on rougher terrain.
Horn,
/// Zevenbergen & Thorne, which works better on smooth terrain.
ZevenbergenThorne,
}

Expand Down