[GRASS-user] Re: make a raster index in GRASS
Ivan Shmakov
ivan at theory.asu.ru
Wed Jul 16 00:05:30 EDT 2008
>>>>> Jamie Adams <jaadfoo at gmail.com> writes:
> Hello all, I'd like to generate a raster index polygon file, just
> like gdaltindex does, but using GRASS rasters as input. Is there a
> command I'm overlooking?
It may depend on the goal, but v.in.region(1) may be of some
use.
> If not, any ideas on how to do this?
Iterating over the set of rasters can be implemented using
g.mlist(1) and the standard Shell `while' and `read' commands,
like:
$ g.mlist type=rast pattern=2008-\*-foo \
| while read r ; do \
: ... do something... ; \
done
And the vectors can be concatenated using v.patch(1), like:
v.in.region output=tmp_vector
v.patch -a output=resulting_vector input=tmp_vector
More information about the grass-user
mailing list