Here is the scenario:

I have a directory with 100+ map projected, single band, rasters that weighs in a 40GB+. I have used ArcMap's built-in mosaicing tools to create a raster mosaic. I am using a custom built suite of image processing tools to perform some stretching and model out some camera error. The next step is to work on contrast matching the overlapping rasters.

I have used the color matching within Arc and am not happy with it. I want to implement my own modified algorithm using either poisson image gradient reconstruction or using a multiresolution spline technique. This will be done in python using GDAL, Numpy, and Scipy.

Does anyone have any suggestions on techniques for finding raster overlap within a directory? The rasters are all variable size and orientation. They are all map projected to the same projection.

Ideas so far that I have discounted:

  1. Manually create a multiband .vrt, perform some array math, and return an array containing just the overlap. This unfortunately, fails to be automated as rasters need to be manually selected.

  2. The images are all relatively close in contrast, so I considered performing some image matching to find areas of overlap. I discounted this based upon the size of the directory to be parsed.

  3. Convert the image to a binary representation (1=data, 0=nodata), then polygonize, and check for overlap with the polygons.

Item three looks to have the most promise, but I am hoping that someone else will have a novel, fast, method.

  • As dango asks below, what version of ArcGIS are you running? Feb 10 '12 at 15:32

You may want to check out gdaltileindex to see if that is what you want. It will automatically build a 'footprint' polygon for each raster. This may not work though if you have nodata values along the edges that you're hoping to exclude, in which case your #3 seems like proper logic (although perhaps not the most efficient.)


What version of arcGIS are you using? if you have arcgis installed try creating a raster mosaic and build foot prints when you do this. Footprints are just the polygon outline of each raster. You could also use arcpy/arcgis to return the stats on each raster with the idea being to create corner points for each raster and create polygons from them.

When I read you question again I realised that if the extent of the raster may not be that same as the extent of the data in the raster. maybe you could try using -srcnodata flag for gdalwarp to set the nodata values if this is not alread done and then use gdal_polygonize.py to create polygons

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.