[GRASS-dev] [GRASS GIS] #3860: GRASS GIS producing different slope than GDAL

GRASS GIS trac at osgeo.org
Mon Jun 10 13:09:15 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:9 mankoff]:
 > I think the issue is related to the region.
 >
 > The `r.slope.aspect` documentation in the NOTES section implies that the
 region is adjusted to the raster. I do not find that to be the case.
 Specifically in the NC test data, I've created the following slope
 rasters, and then looked at their univariate statistics:
 >
 > {{{
 > g.region raster=elevation
 > r.slope.aspect elevation=elevation slope=slope_0
 > r.slope.aspect -a elevation=elevation slope=slope_1
 > g.region res=30 -pa
 > r.slope.aspect elevation=elevation slope=slope_2
 > r.slope.aspect -a elevation=elevation slope=slope_3
 >
 > for i in $(seq 0 3); do
 >   (echo -n "slope_${i} "; r.univar slope_${i} | grep range) | tr '\n' '
 '
 > done
 > }}}
 >
 > Results are:
 >
 > {{{
 > slope_0 range: 36.3347
 > slope_1 range: 36.3347
 > slope_2 range: 13.7754
 > slope_3 range: 25.3968
 > }}}

 Ok, thank you. I am going to close the ticket then.

-- 
Ticket URL: <https://trac.osgeo.org/grass/ticket/3860#comment:10>
GRASS GIS <https://grass.osgeo.org>



More information about the grass-dev mailing list