[Gdal-dev] Indexing with non-square boundary

Dylan Beaudette dylan.beaudette at gmail.com
Thu Aug 9 15:11:42 EDT 2007


On Thursday 09 August 2007 11:49, Avi A Blackmore wrote:
> Hi there,
>
> 	I've run into a thorny issue with gdaltindex, when indexing our satellite
> imagery set.  The imagery taken by the satellites is, of course, shot on
> an angle: the satellites' paths around the Earth are not vertical, but
> skewed on an angle of about 12-13 degrees.  The actual image files, of
> course, are rectangular, which results in large black "null" areas in the
> image.  We use UMN Mapserver to display the imagery, and make the black
> null areas transparent, so that they don't cause a display problem.
>
> 	The problem is, these null areas, while invisible when the image is
> displayed, are still considered "part" of the image as far as gdaltindex
> is concerned.  The bounding box is calculated from the corners of the
> image file, not from the actual corners of the "non-null" parts of the
> image.
>
> 	The result is that, when our site does a query on the image index layer,
> we get a lot of spurious "hits" in our imagery list: images whose bounding
> box intersects the current extents of the map even though the actual
> "live" image data is well outside those extents.
>
> 	So my question is, using GDAL/OGR, how would I create a tile index whose
> bounding boxes are polygons that reflect the actual image path, and omit
> the black null areas?  I haven't found a way to do this using gdaltindex.

I have run into this same type of problem with projected DOQQ files. Since we 
are not performing any time of raster query, we don't have any problems with 
the square tileindex polys... however it would be more efficient (i think) if 
the index used real bounding polygons. 

It might be possible to run through a list of files and using a customized 
python-GDAL script, locate the "corners" of non-null data, use these corners 
to build a polygon geometry, and finally append the polygon to some 
shapefile. Although I have never done this, it shouldn't be all that hard..

Cheers,

Dylan




More information about the Gdal-dev mailing list