[Gdal-dev] gdaltindex on numerous files

Mateusz Loskot mateusz at loskot.net
Wed Jun 14 10:34:27 EDT 2006


Kralidis,Tom [Burlington] wrote:
> Hi,
> 
> I'm trying to create a MapServer tileindex via gdaltindex, where I
> would like to store the absolute paths to each raster image in the
> output tileindex.
> 
> Trying this gives me the following error:
> 
> $ gdaltindex srtm-index2 $PWD/*.tif
> -bash: /usr/local/bin/gdaltindex:
> Argument list too long

Hmm, I'd suppose the problem is with your shell environment.
I use GNU Bash 3.1.17 and your command works well:

mloskot:~/data/samples$ gdaltindex ind $PWD/workshop/*.tif
mloskot:~/data/samples$ dbfdump -h ind
Field 0: Type=String, Title=`location', Width=255, Decimals=0
location
/home/mloskot/data/samples/workshop/drgncimq1926.tif
/home/mloskot/data/samples/workshop/drgncimq1942.tif

but if I run without $PWD:

mloskot:~/data/samples$ gdaltindex ind workshop/*.tif

gdaltindex produces relative paths:

mloskot:~/data/samples$ dbfdump -h ind
Field 0: Type=String, Title=`location', Width=255, Decimals=0
location
workshop/drgncimq1926.tif
workshop/drgncimq1942.tif

and that's normal behaviour.

gdaltindex takes paths as it gets. If you call with
$PWD/workshop/*.tif

the path is constructed as follows:

/home/mloskot/workshop/ + <filename>.tif


> Does gdaltindex take a filelist as an argument?


No, it does not.

MapServer's tile4ms takes metafile with input files list.

Cheers
-- 
Mateusz Loskot
http://mateusz.loskot.net



More information about the Gdal-dev mailing list