[Gdal-dev] Indexing with non-square boundary

Frank Warmerdam warmerdam at pobox.com
Thu Aug 9 15:24:29 EDT 2007


Avi A Blackmore wrote:
> 	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.

Avi,

Assuming you have some sort of image metadata to compute the real footprint,
you could write a python script, or other custom program to generate the
tileindex instead of using gdaltindex.  Inspecting the gdaltindex code
should be instructive.

The distinction in your program would be that you would pass a polygon more
complex (or at least more accurate) than the axis aligned rectangle it
currently creates for boundaries 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.

Are you referring to raster queryies in the mapserver sense described at:

   http://mapserver.gis.umn.edu/docs/howto/raster_data/#raster-query

If so, perhaps we should be looking at a mechanism to make MapServer
exclude offsite results from query results.

If you mean the query done against the tile index to determine which
raster files to render, I'm afraid this query is done based on the bounding
box of the geometries in the tileindex, not the actual polygon.  So making
a very accurate footprint will not help optimize that at all unless the
bounding box of the footprint happens to be smaller than the whole file.

Best regards,
-- 
---------------------------------------+--------------------------------------
I set the clouds in motion - turn up   | Frank Warmerdam, warmerdam at pobox.com
light and sound - activate the windows | http://pobox.com/~warmerdam
and watch the world go round - Rush    | President OSGeo, http://osgeo.org




More information about the Gdal-dev mailing list