[prev in list] [next in list] [prev in thread] [next in thread] 

List:       grass-user
Subject:    Re: [GRASS-user] East/West Horizons Giving Negative Numbers
From:       Stefan Blumentrath <Stefan.Blumentrath () nina ! no>
Date:       2020-05-27 6:50:38
Message-ID: VI1PR02MB5038838EF9DDE7452F7B9C5F9EB10 () VI1PR02MB5038 ! eurprd02 ! prod ! outlook ! com
[Download RAW message or body]

[Attachment #2 (text/plain)]

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

From: grass-user <grass-user-bounces@lists.osgeo.org> On Behalf Of Ashley Cale
Sent: tirsdag 26. mai 2020 21:16
To: grass-user@lists.osgeo.org
Subject: [GRASS-user] East/West Horizons Giving Negative Numbers

  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<http://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       |
 |                                      |
 +----------------------------------------------------------------------------+


[Attachment #3 (text/html)]

<html xmlns:v="urn:schemas-microsoft-com:vml" \
xmlns:o="urn:schemas-microsoft-com:office:office" \
xmlns:w="urn:schemas-microsoft-com:office:word" \
xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" \
xmlns="http://www.w3.org/TR/REC-html40"> <head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta name="Generator" content="Microsoft Word 15 (filtered medium)">
<style><!--
/* Font Definitions */
@font-face
	{font-family:"Cambria Math";
	panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
	{font-family:Calibri;
	panose-1:2 15 5 2 2 2 4 3 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
	{margin:0cm;
	margin-bottom:.0001pt;
	font-size:11.0pt;
	font-family:"Calibri",sans-serif;}
a:link, span.MsoHyperlink
	{mso-style-priority:99;
	color:blue;
	text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
	{mso-style-priority:99;
	color:purple;
	text-decoration:underline;}
p.msonormal0, li.msonormal0, div.msonormal0
	{mso-style-name:msonormal;
	mso-margin-top-alt:auto;
	margin-right:0cm;
	mso-margin-bottom-alt:auto;
	margin-left:0cm;
	font-size:11.0pt;
	font-family:"Calibri",sans-serif;}
span.EmailStyle18
	{mso-style-type:personal-reply;
	font-family:"Calibri",sans-serif;
	color:windowtext;}
.MsoChpDefault
	{mso-style-type:export-only;
	font-size:10.0pt;
	font-family:"Calibri",sans-serif;
	mso-fareast-language:EN-US;}
@page WordSection1
	{size:612.0pt 792.0pt;
	margin:70.85pt 70.85pt 70.85pt 70.85pt;}
div.WordSection1
	{page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]-->
</head>
<body lang="NO-BOK" link="blue" vlink="purple">
<div class="WordSection1">
<p class="MsoNormal"><span lang="EN-US" style="mso-fareast-language:EN-US">Hi \
Ashley,<o:p></o:p></span></p> <p class="MsoNormal"><span lang="EN-US" \
style="mso-fareast-language:EN-US"><o:p>&nbsp;</o:p></span></p> <p \
class="MsoNormal"><span lang="EN-US" style="mso-fareast-language:EN-US">The \
possibility to return negative horizon values was introduced \
here:<o:p></o:p></span></p> <p class="MsoNormal"><a \
href="https://github.com/OSGeo/grass/commit/688d5885557f22c7ea6618dcac3ddfbfc764731a#diff-5ce8290f429502e23efaf9ebdc18bd2b"><span \
lang="EN-US">https://github.com/OSGeo/grass/commit/688d5885557f22c7ea6618dcac3ddfbfc764731a#diff-5ce8290f429502e23efaf9ebdc18bd2b</span></a><o:p></o:p></p>
 <p class="MsoNormal"><o:p>&nbsp;</o:p></p>
<p class="MsoNormal"><span lang="EN-US">The output with the d-flag is azimuth degree \
(-90 – 90, where 0 is parallel with the focal cell).<o:p></o:p></span></p> <p \
class="MsoNormal"><span lang="EN-US">So, from my understanding, negative values \
indicate horizon height below the cell it is computed from.<o:p></o:p></span></p> <p \
class="MsoNormal"><span lang="EN-US"><o:p>&nbsp;</o:p></span></p> <p \
class="MsoNormal"><span lang="EN-US">Maybe the manual could be a bit more specific \
here…?<o:p></o:p></span></p> <p class="MsoNormal"><span \
lang="EN-US"><o:p>&nbsp;</o:p></span></p> <p class="MsoNormal"><span \
lang="EN-US">Cheers<o:p></o:p></span></p> <p class="MsoNormal"><span \
lang="EN-US">Stefan</span><span lang="EN-US" \
style="mso-fareast-language:EN-US"><o:p></o:p></span></p> <p class="MsoNormal"><span \
lang="EN-US" style="mso-fareast-language:EN-US"><o:p>&nbsp;</o:p></span></p> <p \
class="MsoNormal"><b><span lang="EN-US">From:</span></b><span lang="EN-US"> \
grass-user &lt;grass-user-bounces@lists.osgeo.org&gt; <b>On Behalf Of </b>Ashley \
Cale<br> <b>Sent:</b> tirsdag 26. mai 2020 21:16<br>
<b>To:</b> grass-user@lists.osgeo.org<br>
<b>Subject:</b> [GRASS-user] East/West Horizons Giving Negative \
Numbers<o:p></o:p></span></p> <p class="MsoNormal"><span \
lang="EN-US"><o:p>&nbsp;</o:p></span></p> <div>
<p class="MsoNormal"><span lang="EN-US">&nbsp; Hello \
Everyone!&nbsp;<o:p></o:p></span></p> <div>
<p class="MsoNormal"><span lang="EN-US"><o:p>&nbsp;</o:p></span></p>
</div>
<div>
<p class="MsoNormal"><span lang="EN-US">Can help me figure out what's wrong with my \
east and west horizon calculations?<o:p></o:p></span></p> </div>
<div>
<p class="MsoNormal"><span lang="EN-US"><o:p>&nbsp;</o:p></span></p>
</div>
<div>
<p class="MsoNormal"><span lang="EN-US">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.&nbsp;<o:p></o:p></span></p> </div>
<div>
<p class="MsoNormal"><span lang="EN-US"><o:p>&nbsp;</o:p></span></p>
</div>
<div>
<p class="MsoNormal"><span lang="EN-US">Can anyone help me solve this&nbsp;problem? \
Or point me in the right direction?<o:p></o:p></span></p> </div>
<div>
<div>
<p class="MsoNormal"><span lang="EN-US"><o:p>&nbsp;</o:p></span></p>
</div>
<div>
<p class="MsoNormal"><span lang="EN-US">Thank you for the \
help!&nbsp;<o:p></o:p></span></p> </div>
<div>
<p class="MsoNormal"><span lang="EN-US">Ashley&nbsp;<o:p></o:p></span></p>
</div>
</div>
<div>
<p class="MsoNormal"><span lang="EN-US"><o:p>&nbsp;</o:p></span></p>
</div>
<div>
<p class="MsoNormal"><span lang="EN-US">Here is the&nbsp;</span><a \
href="http://r.info/" target="_blank"><span lang="EN-US">r.info</span></a><span \
lang="EN-US">&nbsp;output from my generated east horizon \
raster.<o:p></o:p></span></p> </div>
<div>
<div>
<div>
<div>
<div id="gmail-m_-2428022527238152643gmail-1590022328.000400">
<div style="margin-bottom:12.0pt;box-sizing:inherit">
<div>
<div>
<div>
<div>
<div style="margin-bottom:3.0pt;box-sizing:inherit;max-width:none">
<div>
<div>
<div>
<div>
<div>
<p class="MsoNormal"><span lang="EN-US" \
style="font-size:11.5pt;font-family:&quot;Arial&quot;,sans-serif;color:#1D1C1D">&nbsp; \
|----------------------------------------------------------------------------|<br> \
&nbsp;|&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;& \
nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;|<br>
 &nbsp;| &nbsp;Type of Map:&nbsp;raster \
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Number of Categories: 0 \
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;|<br> &nbsp;| &nbsp;Data \
Type:&nbsp;&nbsp;FCELL&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbs \
p;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;|<br>
 &nbsp;| &nbsp;Data Units: \
&nbsp;degrees&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Vertical datum: \
(none)&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;|<br> &nbsp;| &nbsp;Rows: \
&nbsp;&nbsp;&nbsp;&nbsp;7532 \
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&n \
bsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;|<br> \
&nbsp;| &nbsp;Columns:&nbsp;&nbsp;&nbsp;5860 \
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&n \
bsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;|<br> \
&nbsp;| &nbsp;Total Cells:&nbsp;44137520 \
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;|<br>
 &nbsp;|&nbsp;&nbsp;&nbsp;&nbsp;Projection: UTM (zone 10) \
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;|<br>
 &nbsp;|&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;N: 4543151.24515692&nbsp;&nbsp;S: \
4317194.98362237 &nbsp;Res: 29.99950366 &nbsp;|<br> \
&nbsp;|&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;E: 759846.34683197&nbsp;&nbsp;W: \
584057.70444841 &nbsp;Res: 29.99806184 &nbsp;&nbsp;|<br> &nbsp;| &nbsp;Range of \
data:&nbsp;&nbsp;min = -90&nbsp;max = \
78.47394&nbsp;&nbsp;&nbsp;&nbsp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nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;|<br>
 &nbsp;|&nbsp;&nbsp;r.horizon -d elevation=&quot;dem30m@PERMANENT&quot; direction=0 \
start=0.0 end=\ &nbsp;|<br> &nbsp;|&nbsp;&nbsp;360.0 output=&quot;east&quot; \
distance=1.0 file=&quot;-&quot; \
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;|<br>
 &nbsp;|&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; \
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;|<br>
 &nbsp;|&nbsp;&nbsp;Horizon view from azimuth angle 0.00 degrees CCW from \
East&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;|<br> \
&nbsp;|&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;& \
nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;|<br>
 &nbsp;&#43;----------------------------------------------------------------------------&#43;<o:p></o:p></span></p>
 </div>
<div>
<p class="MsoNormal"><span lang="EN-US" \
style="font-size:11.5pt;font-family:&quot;Arial&quot;,sans-serif;color:#1D1C1D"><o:p>&nbsp;</o:p></span></p>
 </div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</body>
</html>


[Attachment #4 (unknown)]

_______________________________________________
grass-user mailing list
grass-user@lists.osgeo.org
https://lists.osgeo.org/mailman/listinfo/grass-user

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic