A slope map indicates the maximum rate of change between a pixel elevation 
value and its neighboring 8 pixels.  In other words, the output value for each 
pixel represents the steepest slope, or decent to the neighboring elevation 
values.  The output values are given as either percent slope or degrees from 0 
(flat) to 90 (vertical) depending on the command line switches you choose.  

Therefore, the output raster values no longer represent elevation values from 
the input but rather slope (steepness) values and should be interpreted 
differently.  A common way to visually interpret them would be to color code 
them with a color ramp where each color in the ramp represents a range of 
degrees somewhere between 0 and 90.  That way a user can look at the image and 
quickly identify steep slopes versus not so steep slopes and flat areas.  To 
create a color ramp that matches changes in steepness you will need to use a 
statistical method on the slope values such as standard deviations or jenks 
natural breaks to group similar slope values together and where they change.  
In other words, you will want your color ramp to change colors where flat areas 
start to get steeper.  I hope that makes sense.

Another way to use the results would be to write an algorithm to identify areas 
that are within a certain range of steepness so you could identify a good place 
to build a road or perhaps lay train tracks that must not exceed a certain 
steepness.  

I hope that helps.

Best regards,
Martin Chapman

> On Mar 16, 2020, at 5:09 PM, Danilo da Rosa <[email protected]> wrote:
> 
> 
> Hi!
> 
> This may be a very basic question, but I can't find the answer anyware.
> I am working with this DEM obtained using terraincache, it uses mapzen data. 
> The SRC is WGS 84.
> 
> 
> 
> I ran this GDAL command to get the slope:
> 
> gdaldem slope -s 111120 dem.tif slope.tif (I had to do scaling because of the 
> SRC)
> 
> The resulting image looks fine but it's not smooth, it has weird lines over 
> it, like contour lines.
> 
> 
> 
> You can download the DEM file here: https://gofile.io/?c=Du7WnM
> 
> Does anyone have an idea of how to solve it? 
> 
> Thanks in advance for your help,
> 
> Danilo
> 
> P.S. I made this question here too: 
> https://gis.stackexchange.com/questions/353983/slope-obtained-with-gdal-has-weird-lines
> 
> _______________________________________________
> gdal-dev mailing list
> [email protected]
> https://lists.osgeo.org/mailman/listinfo/gdal-dev
_______________________________________________
gdal-dev mailing list
[email protected]
https://lists.osgeo.org/mailman/listinfo/gdal-dev

Reply via email to