<div dir="ltr"><div><div><div>Thanks guys for the quick response.</div>You were right, the shadow wasn't detected because the region hasn't been set.</div><div><br></div><div>Now it seems to be working, but I'm wondering between `r.sunmask` and `r.sun` which one should be used to calculate the shadow mask?<br><br></div>Thanks.<br><br></div>Hakim.<br><div><div><br></div></div></div><div class="gmail_extra"><br><div class="gmail_quote">On 4 September 2017 at 15:43, Micha Silver <span dir="ltr"><<a href="mailto:tsvibar@gmail.com" target="_blank">tsvibar@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div style="direction:ltr" text="#000000" bgcolor="#FFFFFF"><span class="">
<br>
<br>
<div class="m_-629074356143503958moz-cite-prefix">On 09/04/2017 05:15 PM, Hakim Benoudjit
wrote:<br>
</div>
<blockquote type="cite">
<div dir="ltr">
<div>
<div>
<div>Hello,<br>
<br>
</div>
First of all, I'm new to this mailinglist and to GrassGIS in
general.</div>
</div>
</div>
</blockquote></span>
Welcome<span class=""><br>
<blockquote type="cite">
<div dir="ltr">
<div>
<div><br>
</div>
<div>So, I'm trying to use the `r.sunmask` command in order to
extract the shadow from an `SRTM DEM` of the Alps mountains
(Switzerland).</div>
<div>The image had to be first `reprojected` when I've
imported it to a `EPSG:21781` location, in order to get both
the (lat, lon) in meters (similarly to the elevation). <br>
</div>
<br>
</div>
<div>Here is the command I'm executing (note that the time of
the day was chosen at 09:00 in the morning to maximize the
shadow):</div>
<div><br>
</div>
<div>
<pre><code>r.sunmask elevation=n46_e006_1arc_v3@<wbr>PERMANENT output=alps-sunmask.tif year=2014 month=9 day=23 hour=9 minute=0 timezone=1</code></pre>
</div>
<div><br>
</div>
<div>The problem I have is that the image produced is emtpy
(no-data everywhere).</div>
<div>Is there a parameter I'm forgetting to add to the
`r.sunmask` command?</div>
<div>Or should I use `r.sun` command instead, even though I'm
not sure about the parameters I should provide to it either ?<br>
</div>
</div>
</blockquote></span>
Most likely you need to set the region to your DEM.<br>
<font size="+1"><tt>g.region -p </tt></font><tt><font size="+1"><code>rast=n46_e006_1arc_v3@<wbr>PERMANENT<br>
<br>
</code></font></tt>FAQ #1 when using GRASS: Always set the
region first<tt><font size="+1"><code><br>
</code></font></tt>
<blockquote type="cite">
<div dir="ltr">
<div><br>
</div>
Hakim.<br>
</div><span class="">
<br>
<fieldset class="m_-629074356143503958mimeAttachmentHeader"></fieldset>
<br>
<pre>______________________________<wbr>_________________
grass-user mailing list
<a class="m_-629074356143503958moz-txt-link-abbreviated" href="mailto:grass-user@lists.osgeo.org" target="_blank">grass-user@lists.osgeo.org</a>
<a class="m_-629074356143503958moz-txt-link-freetext" href="https://lists.osgeo.org/mailman/listinfo/grass-user" target="_blank">https://lists.osgeo.org/<wbr>mailman/listinfo/grass-user</a></pre>
</span></blockquote><span class="HOEnZb"><font color="#888888">
<br>
<pre class="m_-629074356143503958moz-signature" cols="72">--
Micha Silver
Ben Gurion Univ.
Sde Boker, Remote Sensing Lab
cell: +972-523-665918</pre>
</font></span></div>
</blockquote></div><br></div>