[GRASS-user] get raster name in r.series min/max

Hi all,

I would like to identify the raster, in a r.series calculation for min (or max), where the result is coming from.

Is there a way to do so ?

Thank you

Frank

Hi Frank

El sáb., 25 may. 2019 22:51, Frank David <frank.david@geophom.fr> escribió:

Hi all,

I would like to identify the raster, in a r.series calculation for min
(or max), where the result is coming from.

Is there a way to do so ?

max_raster, min_raster in r.series will give you the index of the raster map in the series containing either max or min values

Is that what you need?

Vero

Thank you

Frank


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

Hei Vero,

Use min_raster and max_for raster method in r.series…

Did you try that?

Cheers

Stefan

···

From: grass-user grass-user-bounces@lists.osgeo.org on behalf of Veronica Andreo veroandreo@gmail.com
Sent: Sunday, May 26, 2019 6:02:47 AM
To: Frank David
Cc: grass-user
Subject: Re: [GRASS-user] get raster name in r.series min/max

Hi Frank

El sáb., 25 may. 2019 22:51, Frank David <frank.david@geophom.fr> escribió:

Hi all,

I would like to identify the raster, in a r.series calculation for min
(or max), where the result is coming from.

Is there a way to do so ?

max_raster, min_raster in r.series will give you the index of the raster map in the series containing either max or min values

Is that what you need?

Vero

Thank you

Frank


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

···

On 26/05/2019 7:02, Veronica Andreo wrote:

Hi Frank

El sáb., 25 may. 2019 22:51, Frank David <frank.david@geophom.fr> escribió:

Hi all,

I would like to identify the raster, in a r.series calculation for min
(or max), where the result is coming from.

Is there a way to do so ?

max_raster, min_raster in r.series will give you the index of the raster map in the series containing either max or min values

Is that what you need?

Vero

Hello Frank:

I used Vero’s suggestion in a script I was working on some months ago: I had a list of rasters, each represented a “station_id”. I used g.list to create the list of raster names, and fed that into r.series input= method=max_raster.

Then I used r.reclass to get back the station_id from the list index. I had a text file with matches between the index of the raster in the list, and it’s actual “station_id”. So r.reclass returned a raster with each pixel value being the station_id of the maximum raster in the list.

HTH

Thank you

Frank


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

_______________________________________________
grass-user mailing list
[grass-user@lists.osgeo.org](mailto:grass-user@lists.osgeo.org)
[https://lists.osgeo.org/mailman/listinfo/grass-user](https://lists.osgeo.org/mailman/listinfo/grass-user)
-- 
Micha Silver
Ben Gurion Univ.
Sde Boker, Remote Sensing Lab
cell: +972-523-665918

Hello,

Thank you very much Vero and Micha, It’s exactly what I was looking for ! That’s great !

Cheers,

Frank

···

Le 26/05/2019 à 12:11, Micha Silver a écrit :

On 26/05/2019 7:02, Veronica Andreo wrote:

Hi Frank

El sáb., 25 may. 2019 22:51, Frank David <frank.david@geophom.fr> escribió:

Hi all,

I would like to identify the raster, in a r.series calculation for min
(or max), where the result is coming from.

Is there a way to do so ?

max_raster, min_raster in r.series will give you the index of the raster map in the series containing either max or min values

Is that what you need?

Vero

Hello Frank:

I used Vero’s suggestion in a script I was working on some months ago: I had a list of rasters, each represented a “station_id”. I used g.list to create the list of raster names, and fed that into r.series input= method=max_raster.

Then I used r.reclass to get back the station_id from the list index. I had a text file with matches between the index of the raster in the list, and it’s actual “station_id”. So r.reclass returned a raster with each pixel value being the station_id of the maximum raster in the list.

HTH

Thank you

Frank


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

_______________________________________________
grass-user mailing list
[grass-user@lists.osgeo.org](mailto:grass-user@lists.osgeo.org)
[https://lists.osgeo.org/mailman/listinfo/grass-user](https://lists.osgeo.org/mailman/listinfo/grass-user)
-- 
Micha Silver
Ben Gurion Univ.
Sde Boker, Remote Sensing Lab
cell: +972-523-665918

On Mon, May 27, 2019 at 4:22 PM Frank David <frank.david@geophom.fr> wrote:

Hello,

Thank you very much Vero and Micha, It's exactly what I was looking for ! That's great !

Please consider to write up a small example for the manual page and/or
the Wiki as it is of interest to many.

thanks
Markus

Hello,

I d’ont know how to do so, and my english is not very fluent… :-/

If someone write something about min/max_raster it could be useful to inform that it’s the output is the index of first min/max meet. Because the order of input raster make outpout different shape in case of equal min/max values in different input rasters and it’s a bit confusing at first

Cheers,

Frank