Re: [GRASS-user] batch processing for raster import

2007-11-13 Thread Maciej Sieczka
Christoph Knoll wrote:
 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?

Christoph,

A one-liner:

for i in *.tif; do r.in.gdal in=$i out=`basename $i
.tif`; done

Adjust the wildcard to match your input raster's extension
and supply more options for r.in.gdal if needed, according
to manual.

Maciek

___
grassuser mailing list
grassuser@grass.itc.it
http://grass.itc.it/mailman/listinfo/grassuser


Re: [GRASS-user] batch processing for raster import

2007-11-13 Thread Christoph Knoll
I've forgotten something that is very necessary! The raster-data are ESRI-Grids
and no tifs,...!!!

cheers
 Chris

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?

Christoph,

Zitat von Maciej Sieczka [EMAIL PROTECTED]:

 Christoph Knoll wrote:


 A one-liner:

 for i in *.tif; do r.in.gdal in=$i out=`basename $i
 .tif`; done

 Adjust the wildcard to match your input raster's extension
 and supply more options for r.in.gdal if needed, according
 to manual.

 Maciek

 ___
 grassuser mailing list
 grassuser@grass.itc.it
 http://grass.itc.it/mailman/listinfo/grassuser




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


Re: [GRASS-user] batch processing for raster import

2007-11-13 Thread Maciej Sieczka
Christoph Knoll wrote:
 I've forgotten something that is very necessary! The raster-data are 
 ESRI-Grids
 and no tifs,...!!!

It shouldn't change much - adjust the wildcard to match you
raster's extension. r.in.gdal should handle ESRI ASCII and
binary grids (refer to the list of formats supported by GDAL
on GDAL's website for details).

Maciek

___
grassuser mailing list
grassuser@grass.itc.it
http://grass.itc.it/mailman/listinfo/grassuser


Re: [GRASS-user] batch processing for raster import

2007-11-13 Thread Frank Broniewski
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


[GRASS-user] batch processing for raster import

2007-11-12 Thread Christoph Knoll
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