<div dir="ltr"><div>Hi Anna and Markus,</div><div><br></div><div>Thank you very much!</div><div><br></div><div>A filled a ticket: <a href="https://github.com/OSGeo/grass/issues/319">https://github.com/OSGeo/grass/issues/319</a></div><div><br></div><div>Best regards,</div><div>Pedro</div><div><br></div><div><br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">Markus Metz <<a href="mailto:markus.metz.giswork@gmail.com">markus.metz.giswork@gmail.com</a>> escreveu no dia quinta, 30/01/2020 à(s) 08:26:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><br><br>On Tue, Jan 28, 2020 at 12:50 PM Pedro Venâncio <<a href="mailto:pedrongvenancio@gmail.com" target="_blank">pedrongvenancio@gmail.com</a>> wrote:<br>><br>> Hi all,<br>><br><div>> 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.</div><div><br></div><div>that seems to be a rounding error, even though float or double should be able to represent -9999 exactly. Should be easy to fix.</div><div><br></div><div>Markus M<br></div>><br>> <a href="https://grass.osgeo.org/grass78/manuals/r.slope.aspect.html" target="_blank">https://grass.osgeo.org/grass78/manuals/r.slope.aspect.html</a><br>><br>> I've tested with GRASS 7.6 (on Linux) and GRASS 7.8.2 (on Windows), both in the GUI and CLI.<br>><br>> (Tue Jan 28 11:19:40 2020) <br>> r.slope.aspect -e -n --verbose elevation=SRTM_PT_25m@PERMANENT slope=SRTM_PT_25m_Slope_Deg_GRASS aspect=SRTM_PT_25m_Aspect_Std_GRASS precision=CELL<br>> Percent complete...<br>> Elevation products for mapset <PERMANENT> in <SRTM_PT_25m><br>> Min computed aspect 0.0000, max computed aspect 360.0000<br>> Aspect raster map <SRTM_PT_25m_Aspect_Std_GRASS> complete<br>> Min computed slope 0.0000, max computed slope 75.2970<br>> Slope raster map <SRTM_PT_25m_Slope_Deg_GRASS> complete<br>> (Tue Jan 28 11:20:24 2020) Comando terminado (43 sec) <br>><br>> <a href="http://r.info" target="_blank">r.info</a> map=SRTM_PT_25m_Aspect_Std_GRASS@PERMANENT <br>> +----------------------------------------------------------------------------+<br>> | Map: SRTM_PT_25m_Aspect_Std_GRASS@ Date: Tue Jan 28 11:20:24 2020 |<br>> | Mapset: PERMANENT Login of Creator: PedroVenancio |<br>> | Location: SRTM_PT_25m |<br>> | DataBase: D:\ICNF\Modelos_Combustivel_2018\Landscape_File\grass78 |<br>> | Title: Aspect counterclockwise in degrees from east |<br>> | Timestamp: none |<br>> |----------------------------------------------------------------------------|<br>> | |<br>> | Type of Map: raster Number of Categories: 360 |<br>> | Data Type: CELL |<br>> | Rows: 23200 |<br>> | Columns: 11360 |<br>> | Total Cells: 263552000 |<br>> | Projection: ETRS89 / Portugal TM06 |<br>> | N: 278000 S: -302000 Res: 25 |<br>> | E: 164000 W: -120000 Res: 25 |<br>> | Range of data: min = -9998 max = 360 |<br>> | |<br>> | Data Source: |<br>> | raster elevation file SRTM_PT_25m@PERMANENT |<br>> | |<br>> | |<br>> | Data Description: |<br>> | generated by r.slope.aspect |<br>> | |<br>> | Comments: |<br>> | aspect map elev = SRTM_PT_25m@PERMANENT |<br>> | zfactor = 1.00 |<br>> | min_slope = 0.000000 |<br>> | |<br>> | r.slope.aspect --verbose -e -n elevation="SRTM_PT_25m@PERMANENT" slo\ |<br>> | pe="SRTM_PT_25m_Slope_Deg_GRASS" aspect="SRTM_PT_25m_Aspect_Std_GRAS\ |<br>> | S" format="degrees" precision="CELL" zscale=1.0 min_slope=0.0 |<br>> | |<br>> +----------------------------------------------------------------------------+<br>> (Tue Jan 28 11:26:09 2020) Comando terminado (0 sec) <br>><br>><br>> Using the default precision as FCELL, all goes ok:<br>><br>> (Tue Jan 28 11:33:08 2020) <br>> r.slope.aspect -e -n --verbose elevation=SRTM_PT_25m@PERMANENT slope=SRTM_PT_25m_Slope_Deg_GRASS_2 aspect=SRTM_PT_25m_Aspect_Std_GRASS_2<br>> Percent complete...<br>> Elevation products for mapset <PERMANENT> in <SRTM_PT_25m><br>> Min computed aspect 0.0000, max computed aspect 359.8096<br>> Aspect raster map <SRTM_PT_25m_Aspect_Std_GRASS_2> complete<br>> Min computed slope 0.0000, max computed slope 75.2970<br>> Slope raster map <SRTM_PT_25m_Slope_Deg_GRASS_2> complete<br>> (Tue Jan 28 11:34:01 2020) Comando terminado (53 sec)<br>><br>> (Tue Jan 28 11:34:27 2020) <br>> <a href="http://r.info" target="_blank">r.info</a> map=SRTM_PT_25m_Aspect_Std_GRASS_2@PERMANENT <br>> +----------------------------------------------------------------------------+<br>> | Map: SRTM_PT_25m_Aspect_Std_GRASS_ Date: Tue Jan 28 11:34:01 2020 |<br>> | Mapset: PERMANENT Login of Creator: PedroVenancio |<br>> | Location: SRTM_PT_25m |<br>> | DataBase: D:\ICNF\Modelos_Combustivel_2018\Landscape_File\grass78 |<br>> | Title: Aspect counterclockwise in degrees from east |<br>> | Timestamp: none |<br>> |----------------------------------------------------------------------------|<br>> | |<br>> | Type of Map: raster Number of Categories: 360 |<br>> | Data Type: FCELL |<br>> | Rows: 23200 |<br>> | Columns: 11360 |<br>> | Total Cells: 263552000 |<br>> | Projection: ETRS89 / Portugal TM06 |<br>> | N: 278000 S: -302000 Res: 25 |<br>> | E: 164000 W: -120000 Res: 25 |<br>> | Range of data: min = -9999 max = 359.8097 |<br>> | |<br>> | Data Source: |<br>> | raster elevation file SRTM_PT_25m@PERMANENT |<br>> | |<br>> | |<br>> | Data Description: |<br>> | generated by r.slope.aspect |<br>> | |<br>> | Comments: |<br>> | aspect map elev = SRTM_PT_25m@PERMANENT |<br>> | zfactor = 1.00 |<br>> | min_slope = 0.000000 |<br>> | |<br>> | r.slope.aspect --verbose -e -n elevation="SRTM_PT_25m@PERMANENT" slo\ |<br>> | pe="SRTM_PT_25m_Slope_Deg_GRASS_2" aspect="SRTM_PT_25m_Aspect_Std_GR\ |<br>> | ASS_2" format="degrees" precision="FCELL" zscale=1.0 min_slope=0.0 |<br>> | |<br>> +----------------------------------------------------------------------------+<br>> (Tue Jan 28 11:34:28 2020) Comando terminado (0 sec) <br>><br>><br>> The elevation map I'm using is this one:<br>> <a href="https://www.fc.up.pt/pessoas/jagoncal/srtm/SRTM_PT_25m.tif" target="_blank">https://www.fc.up.pt/pessoas/jagoncal/srtm/SRTM_PT_25m.tif</a><br>><br>> 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.<br>><br>> Another issue I see is in <a href="http://r.info" target="_blank">r.info</a>, that is showing the title as<br>><br>> | Title: Aspect counterclockwise in degrees from east<br>><br>> which is not correct in this case, as the -n flag was used.<br>><br>> Could these be bugs?<br>><br>> Thank you very much.<br>><br>> Best regards,<br>> Pedro Venâncio<br>> _______________________________________________<br>> grass-dev mailing list<br>> <a href="mailto:grass-dev@lists.osgeo.org" target="_blank">grass-dev@lists.osgeo.org</a><br>> <a href="https://lists.osgeo.org/mailman/listinfo/grass-dev" target="_blank">https://lists.osgeo.org/mailman/listinfo/grass-dev</a></div>
</blockquote></div>