site operations

Darrell McCauley mccauley at ecn.purdue.edu
Wed Jan 5 02:43:52 EST 1994


Simon Cox (simon at artemis.earth.monash.edu.au) writes on 5 Jan 94:
>I have some site lists that I want to use in GRASS.
>Getting them in is not a problem, but then it looks
>like you are on your own.  Are there any buffering/masking
>operators for site data, or do you have to convert to rasters
>using s.menu?

I'm sure of exactly what you are looking for, but 
I recall two separate utilities for creating
vector circles around site data (one with variable
radii, presumably using the third field to define
this). This may be the start of a buffering solution.

Regarding masking and multiple attributes, it's
probably to your advantage to become real familiar
with awk (if you aren't already). E.g., to mask out
values between a high and low range:

s.out.ascii -d siteslist | \
 awk '{if ($3 >= hi || $3 <= lo) print $0}' hi=30 lo=20 | \
 s.in.ascii maskedsitelist

For multiple attributes, I just separate each by a pipe '|'
and work on the sites list directly:

awk -F'|' '{print $1,$2,$(field+2)}' field=8 $LOCATION/site_lists/file | \
 s.in.ascii sitelist8

(this breaks if you're working with sites in another mapset, but
there are ways around this).

Other than rim and awk, I'm afraid the answer is negative.

--Darrell

P.S. I've never gotten rim to work either, but because of the
learning curve and the availability of awk, I've lacked the 
motivation.



More information about the grass-user mailing list