Take the 2-minute tour ×
Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. It's 100% free, no registration required.

I have around 1,000 satellite images in tiff format, and I want to create a shapefile which will serve as an index to the rasters. This is something similar to a raster catalog, but I do not want to build a raster catalog.

Some obstacles I can forsee, is that the image are georefrenced, so they are not rectangular in shape (I am talking about the data area).

Update To clarify, I require the polygon to cover only the non-zero (or non nodata) pixels of the raster, and not the entire rectangular raster. Most of the answers so far, give a rectangular polygon, which covers the data, as well as the non-data pixels.

My Image A sample Satellite Image


Result given by tools I have examined (like raster catlog, various Arcscripts, custom Python script given in one of the answers): Result


Result that I want: enter image description here

share|improve this question
4  
It seems like creating a raster catalog, even temporarily would be a good solution to create footprints. You can create a catalog that is unmanaged, which creates a table of references, but leaves the images in their location on the server. It is easy, and relatively quick to do a batch import of rasters to a catalog. Once created, you can export the footprints to a new featureclass and delete the raster catalog. This might be as quick as other options. –  Get Spatial Jun 6 '12 at 7:33
2  
Mosaic dataset also produces the imagery footprint. –  Roy Jun 6 '12 at 11:12
    
mosaic dataset is the way to go. Very easy to accomplish –  Brad Nesom Jun 6 '12 at 12:30
    
So in the last image, are the pixels outside the red box NoData or 0? If they are 0, are there pixels in the area you want that are also of 0 value? –  Chad Cooper Jun 7 '12 at 13:55
1  
The pixels outside the red border are nodata; However my multi-spectral data has 0,0,0 as the RGB values for the nodata areas. In both cases, there are no pixels with value 0 inside the required area. –  Devdatta Tengshe Jun 7 '12 at 14:42

6 Answers 6

up vote 9 down vote accepted

There is a plugin in QGIS called Image Boundary. It is a great tool. Within this tool there is an option for "Valid Pixels" which will ommit the black edges of a satellite image, for example.

share|improve this answer
    
This plugin claims to do what I wanted, but it is failing on an image that I experimented with. I'll try with my real data tomorrow. –  Devdatta Tengshe Jun 6 '12 at 13:56
    
I found that this plugin works very well with multi-spectral data, but sometimes gives weird results with single-band pancromatic images. –  Devdatta Tengshe Jun 8 '12 at 14:25
    
I agree that the QGIS Image Boundary works the best but is there a tool to do this for vector files where we don't need the "bounding box" or "footprint" but a polygon outlining where data exists. –  GeorgeC Aug 7 '12 at 6:07

The following code will take an input raster, get it's extent, and insert that extent into a polygon featureclass:

import arcpy

r = arcpy.Raster(in_raster)
point = arcpy.Point()
array = arcpy.Array()

corners = ["lowerLeft", "lowerRight", "upperRight", "upperLeft"]

cursor = arcpy.InsertCursor(fc)
feat = cursor.newRow()
for corner in corners:    
    point.X = getattr(r.extent, "%s" % corner).X
    point.Y = getattr(r.extent, "%s" % corner).Y
    array.add(point)
array.add(array.getObject(0))
print len(array)
polygon = arcpy.Polygon(array)
feat.shape = polygon
cursor.insertRow(feat)
array.removeAll()
del feat
del cursor

You can run it in the ArcMap Python window by setting up in_raster and fc like so:

>>> fc = 'r_extent'
>>> in_raster = 'CaliCoast10mNED_HavCurvedPCS'

where r_extent is a existing polygon featureclass. Then just copy the code and run it. I get this:

enter image description here

share|improve this answer
1  
I have use the above code to do the same for a folder: gist.github.com/4162013 –  jeb Nov 28 '12 at 15:33

You can use gdaltindex for this: http://www.gdal.org/gdaltindex.html

It will however still create rectangles (eg 4+1 points) in the same reference system as the images. But I wonder whether that really is a problem: how large are your images?

share|improve this answer
    
The problem with gdaltindex, is that it creates a rectangular polygon for each image. I am only interested in the nonzero value pixels –  Devdatta Tengshe Jun 6 '12 at 13:57

I believe that, in ArcGIS world you can achive it with 3D Analyst\Conversion\From Raster\Raster Domain tool.

share|improve this answer

We're looking for long answers that provide some explanation and context. Don't just give a one-line answer; explain why your answer is right, ideally with citations. Answers that don't include explanations may be removed.

    
It works only on 3D data, and even then does not give expected results. Doesn't work with Satellite Imagery at all. –  Devdatta Tengshe Feb 15 '13 at 9:11
    
Yeah, thats true. I'll leave the answer for others, to be aware of that. –  Tomek Feb 15 '13 at 13:54

There is a tool in ArcGIS 3D Analyst called Raster Domain which creates a polygon or polyline footprint of the data portions of a raster dataset - and ignores NoData cells. Worked great for me.

share|improve this answer
1  
Welcome to our site! Could you explain how your answer differs from Tomek's? –  whuber Apr 12 '13 at 22:04
    
Raster domain worked for me - thanks for your help! –  meryloo yesterday

You could create a raster catalog with a spatial reference assigned, add the raster catalog to ArcMap, and then "Export Footprint". Remember there's the option to create an "UNMANAGED" raster catalog so that you're not making a duplicate of each raster dataset.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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