Created
September 25, 2020 08:36
-
-
Save gpprojekt-marcin/809fde0f3abf94c042030cd76a30cfd6 to your computer and use it in GitHub Desktop.
PyQGIS get Layout maps extents
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
project = QgsProject.instance() | |
manager = project.layoutManager() | |
layoutName = 'KIERUNKI' | |
layoutMain = [layout for layout in manager.printLayouts() if layout.name() == layoutName][0] | |
maps = [item for item in layoutMain.items() if hasattr(item, 'extent')] | |
[m.extent() for m in maps] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment