get raster name in r.series min/max

classic Classic list List threaded Threaded
7 messages Options
Reply | Threaded
Open this post in threaded view
|

get raster name in r.series min/max

FrankD
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

_______________________________________________
grass-user mailing list
[hidden email]
https://lists.osgeo.org/mailman/listinfo/grass-user
Reply | Threaded
Open this post in threaded view
|

Re: get raster name in r.series min/max

Veronica Andreo
Hi Frank

El sáb., 25 may. 2019 22:51, Frank David <[hidden email]> 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
[hidden email]
https://lists.osgeo.org/mailman/listinfo/grass-user

_______________________________________________
grass-user mailing list
[hidden email]
https://lists.osgeo.org/mailman/listinfo/grass-user
SBL
Reply | Threaded
Open this post in threaded view
|

Re: get raster name in r.series min/max

SBL
Hei Vero,
Use min_raster and max_for raster method in r.series...
Did you try that?
Cheers
Stefan


From: grass-user <[hidden email]> on behalf of Veronica Andreo <[hidden email]>
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 <[hidden email]> 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
[hidden email]
https://lists.osgeo.org/mailman/listinfo/grass-user

_______________________________________________
grass-user mailing list
[hidden email]
https://lists.osgeo.org/mailman/listinfo/grass-user
Reply | Threaded
Open this post in threaded view
|

Re: get raster name in r.series min/max

Micha Silver-2
In reply to this post by Veronica Andreo

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

El sáb., 25 may. 2019 22:51, Frank David <[hidden email]> 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=<list> 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
[hidden email]
https://lists.osgeo.org/mailman/listinfo/grass-user

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

_______________________________________________
grass-user mailing list
[hidden email]
https://lists.osgeo.org/mailman/listinfo/grass-user
Reply | Threaded
Open this post in threaded view
|

Re: get raster name in r.series min/max

FrankD

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 <[hidden email]> 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=<list> 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
[hidden email]
https://lists.osgeo.org/mailman/listinfo/grass-user

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

_______________________________________________
grass-user mailing list
[hidden email]
https://lists.osgeo.org/mailman/listinfo/grass-user
Reply | Threaded
Open this post in threaded view
|

Re: get raster name in r.series min/max

Markus Neteler
On Mon, May 27, 2019 at 4:22 PM Frank David <[hidden email]> 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
_______________________________________________
grass-user mailing list
[hidden email]
https://lists.osgeo.org/mailman/listinfo/grass-user
Reply | Threaded
Open this post in threaded view
|

Re: get raster name in r.series min/max

FrankD

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

Le 27/05/2019 à 16:43, Markus Neteler a écrit :

On Mon, May 27, 2019 at 4:22 PM Frank David [hidden email] 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

_______________________________________________
grass-user mailing list
[hidden email]
https://lists.osgeo.org/mailman/listinfo/grass-user