Yes, just use g.copy rast=maskname,MASK
Bill B.
-----Original Message-----
From: Stephan Eickschen [SMTP:eicksch@earth.uni-muenster.de]
Sent: Thursday, July 15, 1999 2:43 PM
To: grass-list@cecer.army.mil
Cc: Stephan Eickschen
Subject: non-interactive r.mask (v. 4.2.1)
Hi GRASSers,
I have to do some stupid work - so I would rather enjoy to write a skript,
fire it and have a decent cup of tea
But, unfortunatly, I don´t know
the
right, best, or "state-of-the-art" way.
My problem:
I have many raster data sets which have to be processed in the same way.
That would not be too complicated if I do not have to change between
different MASKs. A possibility would be to write the skript without
automating the MASK setting. Then I would have to
- set MASK no. 1
- fire the skript
- set MASK no. 2
- fire the skript
and so on.
The problem is that r.mask in _always_ interactive. Just to make it short:
Is there a way to set the MASK non-interactivly?
I tried to look at the different MASK file in the $LOCATION directory, and
it looked somehow promising - but it looked aswell to be a lousy hack...
Any suggestions...
With kind regards,
Stephan
------------------------------------------------------------------------
Stephan Eickschen Tel. : +49 (0)251 83-34704
Westfaelische Wilhelms-Universitaet Fax. : +49 (0)251 83-36100
Institute for Geophysics
Research Unit of Physical Glaciology email: eicksch@uni-muenster.de
Corrensstrasse 24
48149 Muenster
Germany
http://earth.uni-muenster.de/~eicksch/
------------------------------------------------------------------------
If you have several work regions defined within a single raster layer,
it is easy to use a "do" or "for" loop with r.reclass:
(this is in Bourne shell)
----
count=1
while [ $count -le 30 ]
do
r.reclass in=inputmapname out=MASK << EOF
$count = 1
EOF
count=`expr $count + 1`
done
----
Regards,
-Malcolm Williamson
"William L. Baker" wrote:
Yes, just use g.copy rast=maskname,MASK
Bill B.
> -----Original Message-----
> From: Stephan Eickschen [SMTP:eicksch@earth.uni-muenster.de]
> Sent: Thursday, July 15, 1999 2:43 PM
> To: grass-list@cecer.army.mil
> Cc: Stephan Eickschen
> Subject: non-interactive r.mask (v. 4.2.1)
>
> Hi GRASSers,
>
> I have to do some stupid work - so I would rather enjoy to write a skript,
> fire it and have a decent cup of tea
But, unfortunatly, I don´t know
> the
> right, best, or "state-of-the-art" way.
> My problem:
> I have many raster data sets which have to be processed in the same way.
> That would not be too complicated if I do not have to change between
> different MASKs. A possibility would be to write the skript without
> automating the MASK setting. Then I would have to
> - set MASK no. 1
> - fire the skript
> - set MASK no. 2
> - fire the skript
> and so on.
> The problem is that r.mask in _always_ interactive. Just to make it short:
>
> Is there a way to set the MASK non-interactivly?
>
> I tried to look at the different MASK file in the $LOCATION directory, and
> it looked somehow promising - but it looked aswell to be a lousy hack...
>
> Any suggestions...
>
> With kind regards,
>
> Stephan
>
>
> ------------------------------------------------------------------------
>
> Stephan Eickschen Tel. : +49 (0)251 83-34704
> Westfaelische Wilhelms-Universitaet Fax. : +49 (0)251 83-36100
> Institute for Geophysics
> Research Unit of Physical Glaciology email: eicksch@uni-muenster.de
> Corrensstrasse 24
> 48149 Muenster
> Germany
> http://earth.uni-muenster.de/~eicksch/
> ------------------------------------------------------------------------
>