<div>I had thought along that line, but will that not create a new index shapefile for every invocation? </div>
<div>I thought you would have to create a number of index shapefiles, then combining their content later.<br><br> </div>
<div><span class="gmail_quote">On 7/14/06, <b class="gmail_sendername">Frank Warmerdam</b> <<a href="mailto:warmerdam@pobox.com">warmerdam@pobox.com</a>> wrote:</span>
<blockquote class="gmail_quote" style="PADDING-LEFT: 1ex; MARGIN: 0px 0px 0px 0.8ex; BORDER-LEFT: #ccc 1px solid">John Preston wrote:<br>> I'm trying to use gdaltindex and then shptree to create a tile index<br>> for 50000 .tif files but when I try to run gdaltindex I get:
<br>><br>> gdaltindex data/jamaica/tileindex_res_1.shp res_1/*.tif<br>> bash: gdaltindex: Argument list too long<br>><br>> I expect that the problem is that the shell is expanding the *.tif<br>> into one long string to pass to gdaltindex, and this is too long. How
<br>> can I get around this.<br><br>John,<br><br>On Unix/Linux or Cygwin you should be able to do something like:<br><br> find res_1 -name '*.tif' -print | xargs --max-args=50 gdaltindex \<br> data/jamaica/tileindex_res_1.shp
<br><br>Basically, this is using the find command to collect the list of names<br>(instead of wildcards which max out on commandline length limits)<br>and piping the list to xargs which will invoke gdaltindex on up to 50<br>
names at a time.<br><br>Good luck,<br>--<br>---------------------------------------+--------------------------------------<br>I set the clouds in motion - turn up | Frank Warmerdam, <a href="mailto:warmerdam@pobox.com">
warmerdam@pobox.com</a><br>light and sound - activate the windows | <a href="http://pobox.com/~warmerdam">http://pobox.com/~warmerdam</a><br>and watch the world go round - Rush | President OSGF, <a href="http://osgeo.org">
http://osgeo.org</a><br></blockquote></div><br><br clear="all"><br>-- <br>Ludwig M Brinckmann<br>phone: 020 7254 1181<br>mobile: 07949 460787