Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Problem with QGIS Geospatial PDF generated from Layout Manager #60204

Closed
1 of 2 tasks
grayson-a-lee opened this issue Jan 21, 2025 · 18 comments
Closed
1 of 2 tasks

Problem with QGIS Geospatial PDF generated from Layout Manager #60204

grayson-a-lee opened this issue Jan 21, 2025 · 18 comments
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

Comments

@grayson-a-lee
Copy link

What is the bug or the crash?

I have created a contour map in QGIS.

The Measure Tool in the main QGIS window shows a distance of about 439 meters for a feature.

When I output that contour map directly from the main QGIS window as a geospatial PDF, it also shows approximately the same distance using Geospatial Distance Tool in Adobe Acrobat Reader.

However, when I export the geospatial PDF using a layout from the QGIS layout manager, the Geospatial Distance Tool in Adobe Acrobat Reader shows a distance of 194.4 meters when measuring the same feature.

The Project Coordinate Reference System (CRS) is EPSG:2958 – NAD83(CSRS)/UTM zone 17N.

I am attaching the relevant files and layout template.

Contour Map Export_Layout Manager.pdf
Contour Map Export_Main QGIS Window.pdf
2024-12-31 Berm DSM_Ortho-Contour_elev50cm_res100cm_size20_DSM.pdf

Unfortunately, I am unable to upload the *.QPT template file.

I am using QGIS version 3.40.1-Bratislava

Please assist.

Steps to reproduce the issue

Contour Map Export_Layout Manager.pdf
Contour Map Export_Main QGIS Window.pdf
2024-12-31 Berm DSM_Ortho-Contour_elev50cm_res100cm_size20_DSM.pdf

Versions

Version 3.40.1-Bratislava

Supported QGIS version

  • I'm running a supported QGIS version according to the roadmap.

New profile

Additional context

No response

@grayson-a-lee grayson-a-lee added the Bug Either a bug report, or a bug fix. Let's hope for the latter! label Jan 21, 2025
@agiudiceandrea
Copy link
Contributor

agiudiceandrea commented Jan 21, 2025

@grayson-a-lee, thanks for reporting.
It would be useful if you provided the project and a sample layer and all the PDF exporting settings used with which the issue occurs.
I've tried using the same CRS and extent with a sample layer and exporting a sample layout to an A1 GeoSpatial PDF and it seems to me the measurement in both QGIS and Adobe Reader are very similar:

image
image
image

Please also provide the full QGIS version info ad requeated in the issue report form: "In the QGIS Help menu -> About, click in the table, Ctrl+A and then Ctrl+C. Finally paste here. Do not make a screenshot."

@agiudiceandrea agiudiceandrea added Feedback Waiting on the submitter for answers Print Layouts Related to QGIS Print Layouts, Atlas or Reporting frameworks labels Jan 21, 2025
@grayson-a-lee
Copy link
Author

grayson-a-lee commented Jan 21, 2025 via email

@agiudiceandrea
Copy link
Contributor

agiudiceandrea commented Jan 21, 2025

You can put the project file and the layer file(s) in a zip archive file and attach it in comment to this issue report. You can specify the PDF Export options just writing them in the same comment or attaching a screenshot of the PDF Export Options dialog window.

@grayson-a-lee
Copy link
Author

grayson-a-lee commented Jan 22, 2025 via email

@grayson-a-lee
Copy link
Author

grayson-a-lee commented Jan 23, 2025 via email

@agiudiceandrea
Copy link
Contributor

No.

@grayson-a-lee
Copy link
Author

grayson-a-lee commented Jan 23, 2025 via email

@agiudiceandrea
Copy link
Contributor

agiudiceandrea commented Jan 23, 2025

@grayson-a-lee, as you can see, I've done a simple test trying to replicate the issue according to the given description, but it looks like I cannot replicate the issue: do you agree that the measurement in the QGIS's map (EPSG:2958) and in the PDF file exported from a layout, as can be seen in the screenshots provided by me, are the same?

So it would be needed to provide a QGIS project file (containing a Layout) and at least a layer file and step-by-step instructions and parameters used in order to replicate the issue.

@grayson-a-lee
Copy link
Author

grayson-a-lee commented Jan 23, 2025 via email

@agiudiceandrea
Copy link
Contributor

agiudiceandrea commented Jan 23, 2025

As already said, you need to put the files in a zip archive and attach it to a comment to this issue report using the GitHub web interface. If the zip file is too large, please upload it online using a file sharing service and provide the URL to download it.

@grayson-a-lee
Copy link
Author

Hi Andrea:

Here are the files.

PDF Settings.zip

Please let me know if you need anything else.

@agiudiceandrea
Copy link
Contributor

agiudiceandrea commented Jan 23, 2025

@grayson-a-lee, although you didn't provide any layer file, I've managed to replicate the issue using the provided project and layout and adding a sample memory layer created by me: it seems to me the issue is due to the fact that the layout contains 2 totally overlapping Map items ("Map 1" and "Map 2") with the same size and position in the page but different scale and extent.

It looks like Adobe Acrobat Reader get confused due to the overlapping maps with different scales.

You need to remove one of the two overlapping Map items in the layout and link the Scale bar and North arrow items to the correct remaining Map item.

@rouault do you know if it is expected that overlapping maps in a PDF file exported from a layout by QGIS get incorrect georeferencing info when displayed in Adobe Acrobat Reader, i.e. it looks like that, for the overlapping part of the maps, Adobe Acrobat Reader takes georef info (or QGIS writes georef info) not from the uppermost map, but from the underlying one?

@grayson-a-lee
Copy link
Author

grayson-a-lee commented Jan 23, 2025 via email

@grayson-a-lee
Copy link
Author

Bug Layer.zip

Is this the layer file?

@grayson-a-lee
Copy link
Author

And how do I remove one of the map items from the layout?

@agiudiceandrea
Copy link
Contributor

agiudiceandrea commented Jan 23, 2025

I remove one of the map items from the layout?

Select it in the Items panel and delete it. Please read the QGIS Desktop User Guide / Manual at https://docs.qgis.org/3.34/en/docs/user_manual/print_composer/overview_composer.html#the-items-panel. For any other help, not related to any bug, about using QGIS, please consult the QGIS Desktop User Guide / Manual, the Gentle Introduction to GIS and the Training Manual and use https://lists.osgeo.org/mailman/listinfo/qgis-user or https://gis.stackexchange.com/.

@agiudiceandrea agiudiceandrea removed the Feedback Waiting on the submitter for answers label Jan 23, 2025
@grayson-a-lee
Copy link
Author

grayson-a-lee commented Jan 23, 2025

Hello Andrea:

Many thanks for your help. Yes I was able to make things work after deleting the second map and relinking the scale bar and compass to the primary map.

The reason this happened was because, as my background is in professional photography, I was attempting to create a print layout that had a pre-made border for the map. This resulted in getting two maps, one inset within another. Thank you for pointing out my error.

Andrea, what is the best progression for me learning QGIS? I am not attempting to bypass the learning curve by being lazy. However, QGIS is pretty intimidating to a novice user. I have been flirting with it for several years. As my GIS requirements have increased over the years, I need to upgrade my QGIS skills as well.

I want to be able to service my GIS needs with QGIS. Something like ArcGIS is not an option for me.

Best,

Grayson

Also, is this the layer file you were looking for? I have never exported one before.

Bug Layer.zip

(Just trying to learn lol)

@agiudiceandrea
Copy link
Contributor

I've created a new simplified issue report with a simplified test project and layer (in order to make it easier for a developer to fix the bug) at #60248, so I'm closing this one. Thanks for reporting.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
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
Projects
None yet
Development

No branches or pull requests

2 participants