[GRASSLIST:5256] scripting v.in.ogr

Kirk R. Wythers kwythers at UMN.EDU
Wed Jan 5 15:11:45 EST 2005


I would like to automate a process where shape files are read into 
GRASS via v.in.ogr. Currently I can issue individual commands like:

  v.in.ogr -o dsn=~/projects/wrf/shape_files/ output=polys_t59_v1 
layer=polys_t59_v1

where polys_t59_v1 is one of 30 or so different shape files that I want 
to keep as individual vectors. What I need is to replace polys_t59_v1 
with a variable that would hold each shape file temporarily while it is 
read into GRASS.

Can anyone get me started with this kind of script. In the past I've 
used:

for MAP in `g.mlist` ; do

to hold map names  that are listed, but this will not work because the 
shape files are not in GRASS yet.

Thanks,

Kirk R. Wythers	
Dept. of Forest Resources
University of Minnesota
email: kwythers at umn.edu
tel: 612.625.2261
fax: 612.625.5212




More information about the grass-user mailing list