On Tuesday 13 November 2007 08:52:28 Jarosław Jasiewicz wrote: > Christoph Knoll pisze: > > Hello everybody, > > > > I am working with airborne laser scanner data and I need to import more > > than 2000 raster-datasets into my GRASSDatabase. I started to import the > > data with r.in.gdal (it works perfect) but if I do everything myself, I > > will still be importing the data still in a week or so. > > > > Who can tell me how to write or who has a script for batch processing > > (importing the data with the r.in.gdal-command? > > > > I'd be thankful for any help. > > > > Thanks in advance > > Chris > > > > > > -------------------------------- > > University of Innsbruck > > Institute of Geography > > Climate and Cryospheric Research > > Innrain 52f; A - 6020 Innsbruck > > AUSTRIA > > > > KNOLL Christoph, Mag. > > > > Dorfstrasse 106a/3 > > 6240 Radfeld/Tirol > > AUSTRIA > > > > Office: +43 (0)512 507 5416 > > Mobile: +43 (0)650 6013230 > > > > _______________________________________________ > > grassuser mailing list > > grassuser@grass.itc.it > > http://grass.itc.it/mailman/listinfo/grassuser > > something like this: > divide rasters into some directories (2000 may be to much for it) and: > ------ > #!bin/bash > list_of_raster= ls > > for i in $list_of_raster > do > eval `r.in.gdal input=~/your_dir/$i output=so_$i ` > done > ------ > r.in gdal may require some addational parameters > > end script may not work propertly, (i not tested it I use very similar > to import multiple files) > > Jarek > > _______________________________________________ > grassuser mailing list > grassuser@grass.itc.it > http://grass.itc.it/mailman/listinfo/grassuser
I use a similar script to import shapefiles via v.in.ogr #!/bin/bash cd /maps/luxembourg/vector/act/ for i in *_RIVIERE.shp; do fn=cn_`basename "$i" .shp`; # remove the .shp from filename v.in.ogr -o dsn=/maps/luxembourg/vector/act/"$i" output="$fn" # do echo $i "$suffix$i"; done; cd Frank _______________________________________________ grassuser mailing list grassuser@grass.itc.it http://grass.itc.it/mailman/listinfo/grassuser