reply:using mask for sites

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

reply:using mask for sites

/S=E.ODOHERTY/OU=R02F06A/PRMD=USDA.FS.X400/ADMD=TELEMAIL/C=US/
In response to Joe Vaughan's questions:
A command line way to create a mask is to have a raster comprised of
ones where you want to include data (i.e. in mask) and g.rename
it so it's called "MASK".  Likewise you can remove it with g.remove
rast=MASK.
s.menu let's you mask out sites but I haven't figured out a way to
force s.menu to work in a non-interactive mode.  GRASS-gurus, is
there a way?
Erin O'Doherty
Forest Sciences Lab
USDA Forest Service
/s=e.odoherty/ou=r02f06a/prmd=usda.fs.x400/admd=telemail/c=us/@sprint.
com



Reply | Threaded
Open this post in threaded view
|

Re: reply:using mask for sites

Kenn Gardels
In terms of using exclusively interactive commands in a shell script,
you can use a csh "here is" block.  I havn't tried doing that with
s.menu, but have with some other interactive tools.  It just requires
mapping out ahead of time exactly what the sequence of responses is
going to be.  For example (and I am absolutely making this up in mail
- this is not a real s.menu sequence):

        s.menu << EOF
        3
        $file
        y
        $file.new
        n
        q
        EOF

This is just like typing those same commands to s.menu.  Note that the
parser may see the << EOF token and reject this approach.  Is so, you
can use $GISBASE/etc/bin/main/inter/s.menu, but note that if you do
you're flying without a parachute (ie syntax error checking).

-kenn

Reply | Threaded
Open this post in threaded view
|

Re: reply:using mask for sites

Michael Shapiro-3
In reply to this post by /S=E.ODOHERTY/OU=R02F06A/PRMD=USDA.FS.X400/ADMD=TELEMAIL/C=US/
I should add a -m option to s.out.sites to excluded MASKed sites.

Michael