[gdal-dev] Slope obtained with GDAL has weird lines

Alex HighViz alexhighviz at hotmail.com
Mon Mar 16 23:29:30 PDT 2020


Another guess:

The vertical resolution of your DEM is low, say height is measured by 1m intervals, and your horizontal resolution is relatively high, say the pixel size is 25m. Then the minimum slope is 1/25. For many pixels in flatter area, this means adjacent pixels are of exactly

Get Outlook for Android<https://aka.ms/ghei36>

________________________________
From: gdal-dev <gdal-dev-bounces at lists.osgeo.org> on behalf of Joaquim Manuel Freire Luís <jluis at ualg.pt>
Sent: Tuesday, March 17, 2020 12:32:13 AM
To: Danilo da Rosa <daniloide at gmail.com>; gdal-dev at lists.osgeo.org <gdal-dev at lists.osgeo.org>
Subject: Re: [gdal-dev] Slope obtained with GDAL has weird lines


Ah, let me guess. The dem grid was interpolated from contour lines and you seeing the contours again.



From: gdal-dev <gdal-dev-bounces at lists.osgeo.org> On Behalf Of Danilo da Rosa
Sent: Monday, March 16, 2020 11:09 PM
To: gdal-dev at lists.osgeo.org
Subject: [gdal-dev] Slope obtained with GDAL has weird lines



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<https://pypi.org/project/terraincache/>, it uses mapzen data. The SRC is WGS 84.

[DEM File in QGIS]<https://i.stack.imgur.com/Sp4Sg.jpg>

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.

[Slope file on QGIS]<https://i.stack.imgur.com/POcHR.jpg>

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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/gdal-dev/attachments/20200317/af598d78/attachment-0001.html>


More information about the gdal-dev mailing list