4

I have a bunch of SAR images (about 1 GB each) on which i need to do some image processing. Each image is georeferenced and there is significant overlap between each pair of images in the set ie. one piece of terrain appears in 2 or 3 of the images. To reduce the amount of work in the image processing step, is there some way to extract out the approximate areas of overlap between the images ? Specifically, does the GDAL C++ API provide any such functionality ?

I have tried reading the documentation of the API but i couldn't find anything.

  • Are the images in a GDAL readable raster format? If so gdaltindex could be used to calculate the image boundaries and then intersect them to find the overlapping regions. I don't know if this is exposed in the API but you could always take a look at the gdaltindex C++ source code. – Kersten Apr 3 '16 at 9:17
  • 1
    There is very recent development for raster algebra done in GDAL trunk. That may give tools for you in the future. Meanwhile I would check if gdal_calc.py could be useful. Gdaltindex works with bounding boxes and does not suit for this use case. – user30184 Apr 3 '16 at 9:35
  • @Kersten running the exiftool -s -G filename.tif command on the file shows the "GTCitation" tag to be "IMAGINE GeoTIFF Support.COpyright 1991 by ERDAS, Inc. All Rights Reserved. @(#)$RCSfile: egtf.c $ $Revision: 1.10.1.6 ... " – Arjun J Rao Apr 3 '16 at 12:02
  • 1
    @user30184 you are absolutely right. I mixed it up with gdal_trace_outline from Dans GDAL Scripts. There is also an accompanying blog post showing how to use it. – Kersten Apr 3 '16 at 13:19
1

If all you need is a numerical representation of the position of the images (not, say, a raster mask), you can use the origin and resolution found in the geotransform information with the raster size to determine approximate rectangular overlap areas. The geotransform is detailed in the API tutorial:

http://www.gdal.org/gdal_tutorial.html

The nice thing about this method is that you only need to open the dataset, not read the actual raster data.

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.