[GRASS-user] import multiple shapefiles automatically

Barbosa, A. Marcia a.m.barbosa at imperial.ac.uk
Thu Jun 19 11:32:36 EDT 2008


I tried this one:
v.in.ogr 'dsn=C:\QGIS\species_shapefiles'
but it didn't work, it said something like "required output parameter missing"...

then I tried the "one-line-instead-of-a-script":
for i in C:\QGIS\species_shapefiles\*.shp; do v.in.ogr dsn=$i out=`basename $i .shp`; done

but it still gave an error, apparently because the shapefiles didn't have georeferencing information and I was trying to import them to my georreferenced location, hence projection didn't match (although the maps do overlay perfectly). But it said I could add "-o" to the v.in.ogr commmand to override this projection check, so I did:

for i in C:\QGIS\species_shapefiles\*.shp; do v.in.ogr dsn=$i out=`basename $i .shp` -o; done

And it worked! Thanks guys
Márcia 
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/grass-user/attachments/20080619/84397ea8/attachment.html


More information about the grass-user mailing list