Re-Projecting Global Dems For Accurate Slope Calculations

The Problem of Inaccurate Slopes from Projected DEMs

Digital elevation models (DEMs) are raster representations of terrain elevations across landscapes. When DEMs developed in native projection systems like geographic coordinates are projected to planar systems like Universal Transverse Mercator (UTM), elevations and slope calculations can become distorted. This distortion occurs because the process of projecting a 3D model of Earth’s surface onto a 2D plane strains and warps spatial relationships and geometric properties.

For example, a 1 x 1 degree DEM tile extracted from the Shuttle Radar Topography Mission (SRTM) global dataset and reprojected from geographic WGS84 to UTM zone 10N coordinates was found to have over 35% higher mean slope. Specific slope errors ranged from -14 to +12 degrees. These errors stem from slight distortions in elevation surfaces when transformed between coordinate reference systems.

Such uncertainty renders projected DEMs unreliable for applications like landslide modeling, hydrological flow routing, and infrastructure planning that depend on precise terrain derivatives like slope angle and aspect. Thus processes are needed to mitigate slope errors induced by projection transforms.

Understanding Map Projections and Their Effects

Map projections geometrically convert the rounded Earth surface to a 2D planar grid, forcing distortions in shape, area, distance, direction, and elevation. Common global projections include cylindrical, conic, azimuthal, and pseudocylindrical systems, each with different spatial properties and distortion patterns.

Projections like stereographic and azimuthal equidistant tend to provide lower aggregate slope errors compared to transverse cylindrically-based systems. However, no single projection is optimal for preserving slopes globally. The best projection depends on the region, data properties, and intended use case.

Python’s OSGeo/GDAL library provides the workflow for reprojecting DEMs while preserving elevation values. The key steps include defining projection transformations and resampling parameters before executing the raster reprojection:


import gdal

# Define input and output projections 
in_proj = Proj('+proj=longlat +ellps=WGS84 +datum=WGS84')
out_proj = Proj('+proj=utm +zone=10 +ellps=WGS84 +datum=WGS84')  

# Open input DEM GeoTIFF for reading     
src = gdal.Open('input_dem.tif')
dem = src.GetRasterBand(1)

# Create output GeoTIFF for writing
driver = gdal.GetDriverByName('GTiff')
dst = driver.Create('output_dem.tif', dem.XSize, dem.YSize) 

# Reproject dataset from source to destination projection
gdal.ReprojectImage(dem, dst, in_proj, out_proj, gdal.GRA_Bilinear) 

# Clean up resources
del dst 

Mitigating Elevation and Slope Errors

Several best practices can mitigate elevation distortions and slope errors in projected DEMs:

  • Choose an appropriate projection centered on the study area to minimize distortion effects.
  • Use projection transforms that apply little or no height distortion like Lambert Conformal Conic rather than Mercator.
  • Apply post-projection corrections to adjust elevations if needed before calculating terrain attributes.

Resampling methods like bilinear interpolation, cubic convolution, and kriging can also reduce stepping effects along projected elevation surfaces, providing slope continuity:


#Bilinear interpolation resampling
gdal.ReprojectImage(dem, dst, in_proj, out_proj, gdal.GRA_Bilinear)

#Cubic convolution resampling 
gdal.ReprojectImage(dem, dst, in_proj, out_proj, gdal.GRA_Cubic)   

#Kriging interpolation resampling
gdal.ReprojectImage(dem, dst, in_proj, out_proj, method=gdal.GRA_Kriging)  

Correcting slopes after reprojection involves fitting a polynomial trend surface to elevation errors then adjusting cell values based on the residuals at each pixel location to flatten slopes:


# Generate elevation error surface 
err = src_dem - projected_dem

# Fit polynomial  
poly = PolynomialFit(err)   

# Calculate residuals
residuals = err - EvaluatePolynomial(poly)  

# Adjust projected DEM
corrected_dem = projected_dem + residuals  

Working with Reprojected DEMs

Accurately reprojected and corrected DEMs enable advanced geospatial workflows including:

  • Extracting slope, aspect, curvatures, and watershed data
  • Modeling fine-scale hydrological accumulations and flows
  • Simulating soil erosion, landslides, and debris flows
  • Siting and designing distributed infrastructure
  • Optimizing access paths based on grade

But even after projection corrections, some uncertainty in slopes can persist so utilize quality information to inform analysis parameters and error budgets.

Visualize reprojected DEMs alongsideslope maps, hillshades, and elevation error surfaces to qualitatively inspect adjustment quality. Quantitative analysis should also verify performance across a representative set of slope facets and terrain types.

Verifying and Reporting on DEM Reprojection Quality

Rigorously document and validate correction processes to build confidence in adjusted elevation products. Useful quantitative validation metrics include:

  • Absolute mean error
  • Root mean square error (RMSE)
  • Slope RMSE
    • By slope facet faces (N, E, S, W)
    • By land cover type

Report full projection parameters, resampling specifications, and statistical summaries on quality to support transparency and reproducibility. Further visualize uncertainty surfaces to characterize spatial error patterns.

Well documented, validated DEL reprojections enable confident application across numerous fields. But Quantitative analysis should verify performance across terrains before adopting derivatives for critical uses.

Leave a Reply

Your email address will not be published. Required fields are marked *