[GRASS-dev] [GRASS GIS] #3860: GRASS GIS producing different slope than GDAL
GRASS GIS
trac at osgeo.org
Mon Jun 10 01:01:01 PDT 2019
#3860: GRASS GIS producing different slope than GDAL
------------------------+-------------------------
Reporter: mazingaro | Owner: grass-dev@…
Type: defect | Status: new
Priority: major | Milestone: 7.6.2
Component: Raster | Version: unspecified
Resolution: | Keywords: slope
CPU: x86-64 | Platform: Linux
------------------------+-------------------------
Comment (by mazingaro):
Replying to [comment:3 mlennert]:
> Replying to [comment:2 mazingaro]:
> > Replying to [comment:1 mlennert]:
> > > What does GRASS GIS give you when you work at the resolution of the
data, i.e. 1m, instead of 0.5m ?
> > The result is the same (with the -a flag)
>
> Weird. Are you sure you are working on the same region extent ?
>
> I just tried with the NC demo data elevation map, setting the region
with g.region rast=elevation in GRASS. Here are the univar stats of the
difference map between the two:
>
>
> {{{
> > r.univar diff
> 100%
> total null and non-null cells: 8100000
> total null cells: 22784
>
> Of the non-null cells:
> ----------------------
> n: 8077216
> minimum: -9.67979e-05
> maximum: 9.72748e-05
> range: 0.000194073
> mean: -1.50386e-09
> mean of absolute values: 1.30826e-05
> standard deviation: 1.69973e-05
> variance: 2.88908e-10
> variation coefficient: -1.13025e+06 %
> sum: -0.0121469677105779
> }}}
>
> IOW: very small (IMHO negligeable) differences.
>
> However, when I calculate the slope in GRASS with the same region
extent, but a resolution set to 5m, I get much more significant
differences (diff and univar stats calculated at 5m resolution):
>
>
> {{{
> > r.univar diff_restest
> 100%
> total null and non-null cells: 2025000
> total null cells: 5696
>
> Of the non-null cells:
> ----------------------
> n: 2019304
> minimum: 0
> maximum: 19.4712
> range: 19.4712
> mean: 3.74369
> mean of absolute values: 3.74369
> standard deviation: 2.68803
> variance: 7.22549
> variation coefficient: 71.8015 %
> sum: 7559653.93641658
> }}}
This is a normal difference, I don't see problems here. The univar stats
of the defference map were made for GRASS and GDAL produces slopes?
--
Ticket URL: <https://trac.osgeo.org/grass/ticket/3860#comment:4>
GRASS GIS <https://grass.osgeo.org>
More information about the grass-dev
mailing list