[GIS] Creating an overview polygon from a Atlas Print Layout map extent in canvas

atlasgeometry-generatorprint-composerqgisqgis-print-layouts

How do you create multiple polygons from a QGIS Print Composer or Print Layout map extent (i.e. a polygon that are the exact area shown in a map within a print composer/layout)?

Ultimately I would like to do this for an entire atlas so I would like to do this in as automatic a way as possible, but I would even just be content with a rather manual solution too!

Best Answer

A manual solution would be:

In print composer item properties > extents, find the xmin, xmax, ymin and ymax values of the map item.

Use the Geometry by expression tool to create a rectangular polygon. Substitute the actual values into this expression:

make_polygon( geom_from_wkt( 
  'Polygon(( xmax ymax, xmax ymin, xmin ymin, xmin ymax, xmax ymax ))' 
))
Related Question