[Layout] Geospatial PDF has incorrect georeference info for the overlapping region of the Map items #60248
Open
2 tasks done
Labels
Bug
Either a bug report, or a bug fix. Let's hope for the latter!
Print Layouts
Related to QGIS Print Layouts, Atlas or Reporting frameworks
What is the bug or the crash?
A Geospatial PDF (ISO 32000 Extension), exported from a print layout containing 2 (or more) totally or partially overlapping Map items, has incorrect georeferencing information for the overlapping region of the Map items.
The zip archive testlayout.zip contains a vector layer (CRS EPSG:32633 "WGS 84 / UTM zone 33N") with 2 line features (each one having a Cartesian length of 1 km) and a simple project testlayout.qgz with a print layout in which there are 2 partially overlapping Map items (both CRS EPSG:32633) representing the same layer.
The Geospatial PDF Layout 1.pdf has been exported setting the Geospatial PDF (ISO 32000 Extension) option.
Opening the exported Geospatial PDF with Adobe Acrobat Reader 2024.005.20320 on Windows 10 is it possible to verify that, while the lines length in non overlapping regions is correctly measured (1 km), the line length in the overlapping region is incorrect (0,67 km)
Video_2025-01-23_223900.mp4
Note: this is a simpler version, with a simpler reproducible example, of the issue report #60204.
Steps to reproduce the issue
Versions
Supported QGIS version
New profile
Additional context
It looks like the georeferencing info in the overlapping region is taken form the bottommost Map item instead of the topmost Map item.
I guess this may be due to the fact that
QgsPrintLayout
object are listed from the topmost to the bottommostcomposition.xml
file which is used by GDAL to actually generate the PDFThe text was updated successfully, but these errors were encountered: