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.


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()
| improve this answer | |

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.


| improve this answer | |

QGIS 3.10 introduced 2 new tools (or maybe in earlier versions). With it, you can convert layer features to bookmarks or vice versa:

Convert layer to spatial bookmarks

Convert spatial bookmarks to layer

| improve this answer | |

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.