Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I am looking for a very simple thing. I want to create a polygon based on the current view extent of my project.

In fact I want to

1) open google satellite layers 
2) zoom to my area of interest
3) create a polygon based on the 'view extent'

of course, the GE layer is not important, it should work with any view.

share|improve this question

Sounds like spatial bookmarks - maybe that's also an option.

But given that you have a current polygon layer in the same CRS as the project, you can do this in the python console to add a new feature with the current extent:

   f = QgsFeature()
   f.setGeometry( QgsGeometry.fromRect( qgis.utils.iface.mapCanvas().extent() ) )
   l = qgis.utils.iface.activeLayer()
share|improve this answer
hi, yes that looks like a good way. yet I never used the python console. I will check out how that works. can you suggest a good read on that? – Jens Jul 2 '12 at 11:29

I have found the optimal answer (sorry Jef, I started digging into the python console, and will continue, but this one was quicker).

The QMarxan plugin allows for creating a grid from the view extent.


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.