[GRASS-user] import a folder full of shapefiles and reproject on-the-fly?

Moritz Lennert mlennert at club.worldonline.be
Wed Jul 23 17:09:38 EDT 2008


On 23/07/08 22:36, Maciej Sieczka wrote:
> Tim Michelsen pisze:
> 
>> Is there any way that I can import all tiles at once and also
>> reprojecting the CLC shapes into LL?
> 
> Use ogr2ogr to reproject Shapefiles outside GRASS (it accepts directory
> of shapefiles as input as well as single shapefiles) and then import
> them all with v.in.ogr. You can automate v.in.ogr in Shell using "for in
> do" syntax (plenty of examples in the archive or Google it).

I don't think you actually need a for-loop. From the v.in.ogr man page:

layer=string[,string,...]
     OGR layer name. If not given, all available layers are imported

So, normally, if you don't give a layer all the shapefiles in the 
directory (dsn=) will be imported.

You will, however, need a loop for the v.proj step...

Moritz


More information about the grass-user mailing list