Hi Trond, 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.
I've read the source C code for GDALTINDEX utility 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: http://trac.osgeo.org/gdal/browser/trunk/gdal/apps/gdaltindex.c Regards Zhonghai On 9/26/07, Trond Michelsen <[EMAIL PROTECTED]> wrote: > > On Mon, Sep 24, 2007 at 09:17:06AM +0200, Zhonghai Wang wrote: > > I know that the tile index shape file for raster data works very well in > > MapServer. I am just wondering if there is someway to create the tile > index > > file dynamically using MapScript or GDAL/OGR, not only use the MapServer > > utilities. > > > > Do you guys have any idea? or did anyone ever do anything like this? > > I may need to generate my own raster tileindexes myself soon, and > based on what I've read about gdaltindex, it should be fairly easy to > do. > > If I've understood everything correctly, all you have to do, is > generate a shapefile with rectangles that has the same coordinates as > the boundaries of each raster file. Then, the path to that file needs > to be placed in the field "location" in the dbf-file that accompanies > the shapefiles. > > I'll take a stab at making a perl-utility for this tomorrow. I'll let > you know how it turns out. > > -- > Trond Michelsen >
