Computing the slope of a raster dataset


Purpose
This developer sample takes a digital elevation model (DEM) and builds and persists its slope map raster dataset.
 
This is the code to accompany the Building a command-line C++ application scenario.

How to use

If the sample has associated data, you will find that the sample's zip file includes a "data" folder alongside the language folders. However, you will need to update the sample to point to the location of the data once you have extracted all the files.

  1. Compile the application.
  2. Run the application with valid data for the following two parameters: input raster dataset and slope dataset to create.
  3. The slope of the raster dataset will exist with the name you gave it.

RasterSlope.h Header file
RasterSlope.cpp Implementation file
PathUtilities.h Path parsing header file
PathUtilities.cpp Path parsing implementation file
Makefile.Solaris Solaris Makefile — complete version
Makefile.SolarisTemplate Solaris Makefile — to be modified during the scenario
Makefile.Linux Linux Makefile — complete version
Makefile.LinuxTemplate Linux Makefile — to be modified during the scenario
Makefile.Windows Windows Makefile — complete version
Makefile.WindowsTemplate Windows Makefile — to be modified during the scenario
Download the CPP files

Download the files for all languages




Development licensing Deployment licensing
Engine Developer Kit Engine Runtime