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 a tiff image file and want to get a polygon with the extent of the tiff. Is there a direct way of doing this? Right now i have to convert the image to vector (with gdal_polygonize) and then dissolve the polygons...

share|improve this question
I'm not versed with the QGIS API, but would this help? –  dassouki Nov 14 '11 at 18:30
yes, QgsRectangle sounds like what i want, but how do I use it?... –  vascobnunes Nov 14 '11 at 18:34
I think this is a better example from the pyqgis cookbook. If you get the extents, you can use this to create the vector bound –  dassouki Nov 14 '11 at 18:48

2 Answers 2

up vote 3 down vote accepted

Your question isn't clear. Do you want the 'rectangular' extents of the raster, or the extent of the features in the raster? For the rectangular extent, just use the "Tile Index" under Raster > Miscellanious > Tile Index. If you don't see the Raster menu, you may have to install or enable the GDALTools plugin.

And of course if you aren't tied to doing it in QGIS, you could just use GDAL directly. See gdaltileindex

share|improve this answer

If you want only the extent of one image and not the full directory you can go to Vector->Research Tool->Polygon from layer extent here select the image you want the extent and save the output.

share|improve this answer

Your Answer


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.