RE: [GRASS-user] import multiple shapefiles automatically

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

Hi,

2008/6/19 Barbosa, A. Marcia <a.m.barbosa@imperial.ac.uk>:

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"...

v.in.ogr 'dsn=C:\QGIS\species_shapefiles' out=map

creates GRASS vector map with more layers (i.e. fields) (each layer
corresponds to one shapefile), e.g.

$ v.in.ogr dsn=~/smetiste/shp -l
Data source contains 2 layers:
roads, soils

$ v.in.ogr dsn=~/smetiste/shp out=map

$ v.category map opt=report
Layer/table: 1/map_1
type count min max
point 0 0 0
line 825 1 825
boundary 0 0 0
centroid 0 0 0
area 0 0 0
all 825 1 825
Layer/table: 2/map_2
type count min max
point 0 0 0
line 2139 1 2139
boundary 0 0 0
centroid 0 0 0
area 0 0 0
all 2139 1 2139

Martin

--
Martin Landa <landa.martin gmail.com> * http://gama.fsv.cvut.cz/~landa *