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 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

2 Answers 2

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()
   l.startEditing()
   l.addFeature(f)
   l.commitChanges()
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.

thanks!

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.