Hi,
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.
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 !
I wondered if this kind of treatment exists already in Grass.
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.
Sorry for my bad english, I hope you have understand my wishes !
Cheers
Frank
Le 07/02/2019 à 12:04, Veronica Andreo a écrit :
Hi Ken,
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).
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
best,
Vero
El jue., 7 feb. 2019 07:16, Ken Mankoff <mank...@gmail.com
<mailto:mank...@gmail.com>> escribió:
Hi Frank,
On 2019-02-07 at 08:27 +0100, Frank David <frank.da...@geophom.fr
<mailto:frank.da...@geophom.fr>>
wrote...
> I try to find how to get the shifted minimum value of a series of
> raster map. I want to shift by one, or more, the "minimum" value
found
> on each cell to get the "almost minimum" of the series. Is there an
> available function/method to do that ?
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).
-k.
_______________________________________________
grass-user mailing list
grass-user@lists.osgeo.org <mailto:grass-user@lists.osgeo.org>
https://lists.osgeo.org/mailman/listinfo/grass-user
_______________________________________________
grass-user mailing list
grass-user@lists.osgeo.org
https://lists.osgeo.org/mailman/listinfo/grass-user