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

Alex HighViz alexhighviz at hotmail.com
Mon Mar 16 23:34:08 PDT 2020


Oops, message completed below...

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

________________________________
From: gdal-dev <gdal-dev-bounces at lists.osgeo.org> on behalf of Alex HighViz <alexhighviz at hotmail.com>
Sent: Tuesday, 17 March 2020, 06:29
To: Danilo da Rosa; gdal-dev at lists.osgeo.org; Joaquim Manuel Freire Luís
Subject: Re: [gdal-dev] Slope obtained with GDAL has weird lines

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 same height, and for some it is the 1m step that is recorded as a contour line. Basically your data has the profile of a terraced rice paddy.

Could that be it? Alex

________________________________
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/691a0dc9/attachment.html>


More information about the gdal-dev mailing list