[GRASS-dev] r.slope.aspect with -n flag giving aspect of flat areas as -9998
Anna Petrášová
kratochanna at gmail.com
Wed Jan 29 20:23:39 PST 2020
Yes, please create an issue on github:
https://github.com/OSGeo/grass/issues/new/choose
On Tue, Jan 28, 2020 at 6:49 AM Pedro Venâncio <pedrongvenancio at gmail.com>
wrote:
> Hi all,
>
> I was testing r.slope.aspect with the "new" -n flag, also to include -e
> and -n flags in QGIS Processing, but -n flag is giving aspect values of
> flat areas as -9998, instead of -9999, when the precision choosed is CELL,
> and the output data type is CELL.
>
> https://grass.osgeo.org/grass78/manuals/r.slope.aspect.html
>
> I've tested with GRASS 7.6 (on Linux) and GRASS 7.8.2 (on Windows), both
> in the GUI and CLI.
>
> (Tue Jan 28 11:19:40 2020)
>
> r.slope.aspect -e -n --verbose elevation=SRTM_PT_25m at PERMANENT
> slope=SRTM_PT_25m_Slope_Deg_GRASS aspect=SRTM_PT_25m_Aspect_Std_GRASS
> precision=CELL
> Percent complete...
> Elevation products for mapset <PERMANENT> in <SRTM_PT_25m>
> Min computed aspect 0.0000, max computed aspect 360.0000
> Aspect raster map <SRTM_PT_25m_Aspect_Std_GRASS> complete
> Min computed slope 0.0000, max computed slope 75.2970
> Slope raster map <SRTM_PT_25m_Slope_Deg_GRASS> complete
> (Tue Jan 28 11:20:24 2020) Comando terminado (43 sec)
>
> r.info map=SRTM_PT_25m_Aspect_Std_GRASS at PERMANENT
>
>
> +----------------------------------------------------------------------------+
> | Map: SRTM_PT_25m_Aspect_Std_GRASS@ Date: Tue Jan 28 11:20:24
> 2020 |
> | Mapset: PERMANENT Login of Creator:
> PedroVenancio |
> | Location: SRTM_PT_25m
> |
> | DataBase: D:\ICNF\Modelos_Combustivel_2018\Landscape_File\grass78
> |
> | Title: Aspect counterclockwise in degrees from east
> |
> | Timestamp: none
> |
>
> |----------------------------------------------------------------------------|
> |
> |
> | Type of Map: raster Number of Categories: 360
> |
> | Data Type: CELL
> |
> | Rows: 23200
> |
> | Columns: 11360
> |
> | Total Cells: 263552000
> |
> | Projection: ETRS89 / Portugal TM06
> |
> | N: 278000 S: -302000 Res: 25
> |
> | E: 164000 W: -120000 Res: 25
> |
> | Range of data: min = -9998 max = 360
> |
> |
> |
> | Data Source:
> |
> | raster elevation file SRTM_PT_25m at PERMANENT
> |
> |
> |
> |
> |
> | Data Description:
> |
> | generated by r.slope.aspect
> |
> |
> |
> | Comments:
> |
> | aspect map elev = SRTM_PT_25m at PERMANENT
> |
> | zfactor = 1.00
> |
> | min_slope = 0.000000
> |
> |
> |
> | r.slope.aspect --verbose -e -n elevation="SRTM_PT_25m at PERMANENT"
> slo\ |
> | pe="SRTM_PT_25m_Slope_Deg_GRASS"
> aspect="SRTM_PT_25m_Aspect_Std_GRAS\ |
> | S" format="degrees" precision="CELL" zscale=1.0 min_slope=0.0
> |
> |
> |
>
> +----------------------------------------------------------------------------+
> (Tue Jan 28 11:26:09 2020) Comando terminado (0 sec)
>
>
>
> Using the default precision as FCELL, all goes ok:
>
> (Tue Jan 28 11:33:08 2020)
>
> r.slope.aspect -e -n --verbose elevation=SRTM_PT_25m at PERMANENT
> slope=SRTM_PT_25m_Slope_Deg_GRASS_2 aspect=SRTM_PT_25m_Aspect_Std_GRASS_2
> Percent complete...
> Elevation products for mapset <PERMANENT> in <SRTM_PT_25m>
> Min computed aspect 0.0000, max computed aspect 359.8096
> Aspect raster map <SRTM_PT_25m_Aspect_Std_GRASS_2> complete
> Min computed slope 0.0000, max computed slope 75.2970
> Slope raster map <SRTM_PT_25m_Slope_Deg_GRASS_2> complete
> (Tue Jan 28 11:34:01 2020) Comando terminado (53 sec)
>
> (Tue Jan 28 11:34:27 2020)
>
> r.info map=SRTM_PT_25m_Aspect_Std_GRASS_2 at PERMANENT
>
>
> +----------------------------------------------------------------------------+
> | Map: SRTM_PT_25m_Aspect_Std_GRASS_ Date: Tue Jan 28 11:34:01 2020
> |
> | Mapset: PERMANENT Login of Creator:
> PedroVenancio |
> | Location: SRTM_PT_25m
> |
> | DataBase: D:\ICNF\Modelos_Combustivel_2018\Landscape_File\grass78
> |
> | Title: Aspect counterclockwise in degrees from east
> |
> | Timestamp: none
> |
>
> |----------------------------------------------------------------------------|
> |
> |
> | Type of Map: raster Number of Categories: 360
> |
> | Data Type: FCELL
> |
> | Rows: 23200
> |
> | Columns: 11360
> |
> | Total Cells: 263552000
> |
> | Projection: ETRS89 / Portugal TM06
> |
> | N: 278000 S: -302000 Res: 25
> |
> | E: 164000 W: -120000 Res: 25
> |
> | Range of data: min = -9999 max = 359.8097
> |
> |
> |
> | Data Source:
> |
> | raster elevation file SRTM_PT_25m at PERMANENT
> |
> |
> |
> |
> |
> | Data Description:
> |
> | generated by r.slope.aspect
> |
> |
> |
> | Comments:
> |
> | aspect map elev = SRTM_PT_25m at PERMANENT
> |
> | zfactor = 1.00
> |
> | min_slope = 0.000000
> |
> |
> |
> | r.slope.aspect --verbose -e -n elevation="SRTM_PT_25m at PERMANENT"
> slo\ |
> | pe="SRTM_PT_25m_Slope_Deg_GRASS_2"
> aspect="SRTM_PT_25m_Aspect_Std_GR\ |
> | ASS_2" format="degrees" precision="FCELL" zscale=1.0 min_slope=0.0
> |
> |
> |
>
> +----------------------------------------------------------------------------+
> (Tue Jan 28 11:34:28 2020) Comando terminado (0 sec)
>
>
> The elevation map I'm using is this one:
> https://www.fc.up.pt/pessoas/jagoncal/srtm/SRTM_PT_25m.tif
>
> As CELL is a 32 bit integer with a range from -2,147,483,647 to
> +2,147,483,647, -9999 should be fine to conform inside it.
>
> Another issue I see is in r.info, that is showing the title as
>
> | Title: Aspect counterclockwise in degrees from east
>
> which is not correct in this case, as the -n flag was used.
>
> Could these be bugs?
>
> Thank you very much.
>
> Best regards,
> Pedro Venâncio
> _______________________________________________
> grass-dev mailing list
> grass-dev at lists.osgeo.org
> https://lists.osgeo.org/mailman/listinfo/grass-dev
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/grass-dev/attachments/20200129/80cd638a/attachment-0001.html>
More information about the grass-dev
mailing list