<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>&nbsp;</div>
<div><span class="gmail_quote">On 7/14/06, <b class="gmail_sendername">Frank Warmerdam</b> &lt;<a href="mailto:warmerdam@pobox.com">warmerdam@pobox.com</a>&gt; 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>&gt; I'm trying to use gdaltindex and then shptree to create a tile index<br>&gt; for 50000 .tif files but when I try to run gdaltindex I get:
<br>&gt;<br>&gt; gdaltindex data/jamaica/tileindex_res_1.shp res_1/*.tif<br>&gt; bash: gdaltindex: Argument list too long<br>&gt;<br>&gt; I expect that the problem is that the shell is expanding the *.tif<br>&gt; into one long string to pass to gdaltindex, and this is too long. How
<br>&gt; 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>&nbsp;&nbsp;find res_1 -name '*.tif' -print | xargs --max-args=50 gdaltindex \<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 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&nbsp;&nbsp; | 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&nbsp;&nbsp;&nbsp;&nbsp;| 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