[gdal-dev] Weird results with gdaldem slope

Hare, Trent thare at usgs.gov
Tue Feb 12 08:47:16 PST 2013


George,
  That sounds like a resampling issue (either from up/down sampling or in
your case from the reprojection stage). During projection, I
*don't*recommend using a nearest neighbor method but a bilinear (or
"higher") for
DEMs. Nearest neighbor is generally the default for applications because it
is fast. Fortunately, GDAL and ArcMap both have options for bilinear or
cubic during reprojection. Running a nearest neighbor can generate a
stair-step for the DEM (and thus odd slopes).

That should solve it...,
Trent




On Mon, Feb 11, 2013 at 11:17 PM, George <grub80 at gmail.com> wrote:

> Hi there,
>
> I am using gdaldem to get a slope raster from a DEM (source: ASTER), but
> it seems like I can't get a correct result. For comparison purposes I did
> the same steps using Arcgis 10.0. In particular, I followed two procedures:
>
> Procedure 1
> 1. Mosaiced different DEM rasters together
> 2. Projected the mosaic coordinates to linear
> 3. Calculated slope (for gdal: gdaldem slope with no extra options)
>
> The result I get is ok, but there are some linear features that are
> clearly artificial. ArcGIS  gave the same result.
>
> Procedure 2
> 1. Mosaiced different DEM rasters together
> 2. Calculated slope (for gdal: gdaldem slope -s 111120)
> 3. Projected the slope raster in linear coord.
>
> The result is perfect in ArcGIS, while gdaldem returns a rsater that looks
> all white with some black dots (in greyscale, using the same scale of the
> ArcGIS one).
>
> What am I doing wrong? I am new to the mailing list (and gdal), so I am
> not sure if it's ok to attach examples. If you need them, I'll be happy to
> post the rasters.
>
>
> George
>
> _______________________________________________
> gdal-dev mailing list
> gdal-dev at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/gdal-dev
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/gdal-dev/attachments/20130212/424992c2/attachment.html>


More information about the gdal-dev mailing list