Hello Everyone!
Can help me figure out what’s wrong with my east and west horizon calculations?
I am trying to compute my east and west horizon angle from my DEM using the command r.horizon. My output raster contains negative numbers and it’s my understanding that the range of output values should be between 0 and 360. I used -d to make sure that my output is in degrees rather than radians.
Can anyone help me solve this problem? Or point me in the right direction?
Thank you for the help!
Ashley
Here is the r.info output from my generated east horizon raster.
|----------------------------------------------------------------------------|
| |
| Type of Map: raster Number of Categories: 0 |
| Data Type: FCELL |
| Data Units: degrees Vertical datum: (none) |
| Rows: 7532 |
| Columns: 5860 |
| Total Cells: 44137520 |
| Projection: UTM (zone 10) |
| N: 4543151.24515692 S: 4317194.98362237 Res: 29.99950366 |
| E: 759846.34683197 W: 584057.70444841 Res: 29.99806184 |
| Range of data: min = -90 max = 78.47394 |
| |
| Data Description: |
| generated by r.horizon |
| |
| Comments: |
| r.horizon -d elevation=“dem30m@PERMANENT” direction=0 start=0.0 end=\ |
| 360.0 output=“east” distance=1.0 file=“-” |
| |
| Horizon view from azimuth angle 0.00 degrees CCW from East |
| |
±---------------------------------------------------------------------------+
Hi Ashley,
The possibility to return negative horizon values was introduced here:
https://github.com/OSGeo/grass/commit/688d5885557f22c7ea6618dcac3ddfbfc764731a#diff-5ce8290f429502e23efaf9ebdc18bd2b
The output with the d-flag is azimuth degree (-90 – 90, where 0 is parallel with the focal cell).
So, from my understanding, negative values indicate horizon height below the cell it is computed from.
Maybe the manual could be a bit more specific here…?
Cheers
Stefan
···
Hello Everyone!
Can help me figure out what’s wrong with my east and west horizon calculations?
I am trying to compute my east and west horizon angle from my DEM using the command r.horizon. My output raster contains negative numbers and it’s my understanding that the range of output values should be between 0 and 360. I used -d to make sure that my output is in degrees rather than radians.
Can anyone help me solve this problem? Or point me in the right direction?
Thank you for the help!
Ashley
Here is the r.info output from my generated east horizon raster.
|----------------------------------------------------------------------------|
| |
| Type of Map: raster Number of Categories: 0 |
| Data Type: FCELL |
| Data Units: degrees Vertical datum: (none) |
| Rows: 7532 |
| Columns: 5860 |
| Total Cells: 44137520 |
| Projection: UTM (zone 10) |
| N: 4543151.24515692 S: 4317194.98362237 Res: 29.99950366 |
| E: 759846.34683197 W: 584057.70444841 Res: 29.99806184 |
| Range of data: min = -90 max = 78.47394 |
| |
| Data Description: |
| generated by r.horizon |
| |
| Comments: |
| r.horizon -d elevation=“dem30m@PERMANENT” direction=0 start=0.0 end=\ |
| 360.0 output=“east” distance=1.0 file=“-” |
| |
| Horizon view from azimuth angle 0.00 degrees CCW from East |
| |
±---------------------------------------------------------------------------+
Hi,
On Wed, May 27, 2020 at 8:50 AM Stefan Blumentrath
<Stefan.Blumentrath@nina.no> wrote:
Hi Ashley,
The possibility to return negative horizon values was introduced here:
https://github.com/OSGeo/grass/commit/688d5885557f22c7ea6618dcac3ddfbfc764731a#diff-5ce8290f429502e23efaf9ebdc18bd2b
The output with the d-flag is azimuth degree (-90 – 90, where 0 is parallel with the focal cell).
So, from my understanding, negative values indicate horizon height below the cell it is computed from.
Maybe the manual could be a bit more specific here…?
Please check this manual change for clarity:
https://github.com/OSGeo/grass/pull/754
best,
Markus
--
Markus Neteler, PhD
https://www.mundialis.de - free data with free software
https://grass.osgeo.org
https://courses.neteler.org/blog