<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
</head>
<body bgcolor="#FFFFFF" text="#333333">
<p>I forgot one thing to well understand my wish. Each viewshed
raster is a r.series (250-sum) of 250 r.viewshed with 2m target
and 0 upto 250m terrain height. So each raster gives the hidden
height of a building (250m max) anywhere on the region from a
specific point of view. The purpose is to get the area of hidden
wind turbine from roads for a specific wind turbine height.</p>
<p>Cheers,</p>
<p>Frank<br>
</p>
<div class="moz-cite-prefix">Le 07/02/2019 à 12:48, Frank David a
écrit :<br>
</div>
<blockquote type="cite"
cite="mid:ddec21d7-fbef-8a36-4f6f-a0f4a923814f@geophom.fr">
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<p>Hi,</p>
<p>Thanks for your reply. I can have numerous raster (several
hundreds). I want to find a minimum but with a tolerance, it's
why I want to be able to shift the value. In fact I want to sort
the value of my all input raster for each x,y cell and get the
second or third, or any position in the sorted list, to build my
output raster. My application is to get the area not visible
from a road (I did 1600 viewshed raster from the roads every
250m). I want a tolerance in order that one point of view (top
of hill) does not reduce too much the hidden area. To do so, a
fixed number of my point of view (20%) does not reduce the
hidden area. The result is the area is hidden from 80% of the
road.<br>
</p>
<p>I already wrote a python script that read all rasters for each
x,y cell and make a array(), sort the array values, and build a
raster. It works on reasonable number of cell, but seems to
fails with large number of cells. I'm not a programmer !<br>
</p>
<p>I wondered if this kind of treatment exists already in Grass. <br>
</p>
<p>If somebody wants to hemps me to develop this, I could be nice.
But I think it could be an improvement of r.series function.</p>
<p>Sorry for my bad english, I hope you have understand my wishes
!<br>
</p>
<p>Cheers</p>
<p>Frank<br>
</p>
<div class="moz-cite-prefix">Le 07/02/2019 à 12:04, Veronica
Andreo a écrit :<br>
</div>
<blockquote type="cite"
cite="mid:CAAMki4FmyaxJo-NX_V177iBxnAsFkbOcfB-gbM-4r3UM0sjXvw@mail.gmail.com">
<meta http-equiv="content-type" content="text/html;
charset=UTF-8">
<div dir="auto">Hi Ken,
<div dir="auto"><br>
</div>
<div dir="auto">There isn't any build-in function for that in
grass, afaik. Depending on how long is your series, you
could shift the map list you use in each run and then use
r.univar on each output from r.series to get the minimum and
by comparison, get the second minimum of the series of maps
(a scalar). </div>
<div dir="auto"><br>
</div>
<div dir="auto">However, if what you need is a map of second
minimums per pixel, I believe that might require some
programming for a new function... Do you know any other
software which has this function? Maybe, if there's such
thing in Python for example, it could be recycled or used
with grass maps in a script... Dunno, just thinking out loud</div>
<div dir="auto"><br>
</div>
<div dir="auto">best,</div>
<div dir="auto">Vero</div>
</div>
<br>
<div class="gmail_quote">
<div dir="ltr">El jue., 7 feb. 2019 07:16, Ken Mankoff <<a
href="mailto:mankoff@gmail.com" target="_blank"
rel="noreferrer" moz-do-not-send="true">mankoff@gmail.com</a>>
escribió:<br>
</div>
<blockquote class="gmail_quote" style="margin:0 0 0
.8ex;border-left:1px #ccc solid;padding-left:1ex">Hi Frank,<br>
<br>
On 2019-02-07 at 08:27 +0100, Frank David <<a
href="mailto:frank.david@geophom.fr" rel="noreferrer
noreferrer" target="_blank" moz-do-not-send="true">frank.david@geophom.fr</a>><br>
wrote...<br>
> I try to find how to get the shifted minimum value of a
series of<br>
> raster map. I want to shift by one, or more, the
"minimum" value found<br>
> on each cell to get the "almost minimum" of the series.
Is there an<br>
> available function/method to do that ?<br>
<br>
I don't think I fully understand what you want. Are you
working with strds? You mention "series". If I wanted to get
the second-minimum of a single raster, I would use r.stats
with the "-1" flag, sort, and search for the 2nd (or
2nd-to-last).<br>
<br>
-k.<br>
<br>
_______________________________________________<br>
grass-user mailing list<br>
<a href="mailto:grass-user@lists.osgeo.org" rel="noreferrer
noreferrer" target="_blank" moz-do-not-send="true">grass-user@lists.osgeo.org</a><br>
<a
href="https://lists.osgeo.org/mailman/listinfo/grass-user"
rel="noreferrer noreferrer noreferrer" target="_blank"
moz-do-not-send="true">https://lists.osgeo.org/mailman/listinfo/grass-user</a></blockquote>
</div>
</blockquote>
<br>
<fieldset class="mimeAttachmentHeader"></fieldset>
<pre class="moz-quote-pre" wrap="">_______________________________________________
grass-user mailing list
<a class="moz-txt-link-abbreviated" href="mailto:grass-user@lists.osgeo.org">grass-user@lists.osgeo.org</a>
<a class="moz-txt-link-freetext" href="https://lists.osgeo.org/mailman/listinfo/grass-user">https://lists.osgeo.org/mailman/listinfo/grass-user</a></pre>
</blockquote>
</body>
</html>