<div>Hi Trond,</div>
<div>&nbsp;</div>
<div>thanks you for your clues for creating the index file, I am looking forword to sharing your experience of creating the utility programmatically. Actually, I create more often MapInfo seamless layer programmatically, but I am not very familar with the ESRI index file format, so I am just not sure how I should use the ShapeLib to create the index file.
</div>
<div>&nbsp;</div>
<div>I&#39;ve read the source C code for&nbsp;GDALTINDEX&nbsp;utility&nbsp;in the GDAL/OGR source package, unfortunatelly, I have not totally understand the source code. Here is the source code link, hope that it can give you some additional information for your experiment:
</div>
<div>&nbsp;</div>
<div><a href="http://trac.osgeo.org/gdal/browser/trunk/gdal/apps/gdaltindex.c">http://trac.osgeo.org/gdal/browser/trunk/gdal/apps/gdaltindex.c</a></div>
<div>&nbsp;</div>
<div>Regards</div>
<div>&nbsp;</div>
<div>Zhonghai<br>&nbsp;</div>
<div><span class="gmail_quote">On 9/26/07, <b class="gmail_sendername">Trond Michelsen</b> &lt;<a href="mailto:trondmm-mapserver@crusaders.no">trondmm-mapserver@crusaders.no</a>&gt; wrote:</span>
<blockquote class="gmail_quote" style="PADDING-LEFT: 1ex; MARGIN: 0px 0px 0px 0.8ex; BORDER-LEFT: #ccc 1px solid">On Mon, Sep 24, 2007 at 09:17:06AM +0200, Zhonghai Wang wrote:<br>&gt; I know that the tile index shape file for raster data works very well in
<br>&gt; MapServer. I am just wondering if there is someway to create the tile index<br>&gt; file dynamically using MapScript or GDAL/OGR, not only use the MapServer<br>&gt; utilities.<br>&gt;<br>&gt; Do you guys have any idea? or did anyone ever do anything like this?
<br><br>I may need to generate my own raster tileindexes myself soon, and<br>based on what I&#39;ve read about gdaltindex, it should be fairly easy to<br>do.<br><br>If I&#39;ve understood everything correctly, all you have to do, is
<br>generate a shapefile with rectangles that has the same coordinates as<br>the boundaries of each raster file. Then, the path to that file needs<br>to be placed in the field &quot;location&quot; in the dbf-file that accompanies
<br>the shapefiles.<br><br>I&#39;ll take a stab at making a perl-utility for this tomorrow. I&#39;ll let<br>you know how it turns out.<br><br>--<br>Trond Michelsen<br></blockquote></div><br>