[GRASSLIST:6422] Re: use of c_minx and c_maxx in r.series

vincent at ecovla.nl vincent at ecovla.nl
Tue Apr 12 03:18:20 EDT 2005


Hamish wrote:
> On Mon, 11 Apr 2005 17:17:29 +0200
> "vincent at ecovla.nl" <vincent at ecovla.nl> wrote:
> 
> 
>>Martin Wegmann wrote:
>>
>>>hello  Vincent, 
>>>
>>>On Monday 11 April 2005 10:23, vincent at ecovla.nl wrote:
>>>[....]
>>>
>>>
>>>>Now with Glynns functions I'm already half-way: I can create the
>>>
>>>index. >Now how do I apply this index to a series of raster files? Is
>>>there a >simple and robust (like accepting input from g.mlist) trick
>>>using >r.mapcalc? Or is Glynn currently writing r.series.fromindex
>>>and am I too >anxious and should I be patient? Or need I write it
>>>myself? Any hints?
>>>
>>>
>>>if you have a time-series of raster files with the names: 
>>>
>>>raster_name.1
>>>raster_name.2 
>>>etc.
>>>
>>>just do:
>>>
>>>r.series input="`g.mlist pattern='raster_name.*' sep=,`"
>>>method=min_x 
>>>
>>>Martin
>>>
>>
>>Well, thanks, but that's the part that I already knew. Sorry if I
>>formulated my problem badly.
>>What you describe will give me an output raster file which is in fact
>>an index referring to my input series of raster files, right? Now what
>>I want to do is use this result, the index raster, to get values from
>>comparable but different raster series, e.g. different bands of the
>>same time series. My problem is not how to define the series or have
>>them as input using g.mlist, I know how to do that. My problem is that
>>I want to do e.g. r.series.fromindex input=$series_red
>>index=$output_of_min_x.
> 
> 
> 
> x=1
> r.mapcalc if(index==$x)
> 
> for each step then r.patch all the parts together?
> 
> 
> Hamish

Hmm it's a solution, but not really what I hoped for: something more
efficient, and easier to use. Maybe I'll try to create an
r.series.fromindex...

Vincent.




More information about the grass-user mailing list