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

QGIS master exports out of bounds in layout #48624

Closed
1 of 2 tasks
antoniolocandro opened this issue May 18, 2022 · 14 comments
Closed
1 of 2 tasks

QGIS master exports out of bounds in layout #48624

antoniolocandro opened this issue May 18, 2022 · 14 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 Upstream Needs changes in an upstream library (like Qt, Proj, GDAL, ...)

Comments

@antoniolocandro
Copy link
Contributor

What is the bug or the crash?

QGIS on export to PDF puts vectors outside of print area/map canvas defined

image

Steps to reproduce the issue

Create a layout in A1 size paper using a WMS layer as backgound, add some vector data and export to PDF

Versions

QGIS version
3.25.0-Master
QGIS code revision
400fa80
Qt version
5.15.3
Python version
3.9.5
Compiled against GDAL/OGR
3.6.0dev-fea1523496
Running against GDAL/OGR
3.6.0dev-efd4398104
PROJ version
9.0.0
EPSG Registry database version
v10.054 (2022-02-13)
GEOS version
3.10.2-CAPI-1.16.0
SQLite version
3.38.1
PDAL version
2.3.0
PostgreSQL client version
unknown
SpatiaLite version
5.0.1
QWT version
6.1.6
QScintilla2 version
2.13.1
OS version
Windows 10 Version 2009

This copy of QGIS writes debugging output.

Active Python plugins
DigitizingTools
1.5.1
latlontools
3.6.3
MemoryLayerSaver
4.0.4
mmqgis
2021.9.10
qconsolidate3
0.2.0
quick_map_services
0.19.29
shapetools
3.4.4
db_manager
0.1.20
grassprovider
2.12.99
processing
2.12.99

Supported QGIS version

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

New profile

  • I tried with a new QGIS profile

Additional context

No response

@antoniolocandro antoniolocandro added the Bug Either a bug report, or a bug fix. Let's hope for the latter! label May 18, 2022
@antoniolocandro
Copy link
Contributor Author

Works as expected in QGIS 3.24

image

@nyalldawson
Copy link
Collaborator

Are you using label masks in this project?

@nyalldawson nyalldawson added the Feedback Waiting on the submitter for answers label May 18, 2022
@antoniolocandro
Copy link
Contributor Author

I am but not for the red polygons which are the ones that go beyond the areas, just for the contours

@Pedro-Murteira Pedro-Murteira added the Print Layouts Related to QGIS Print Layouts, Atlas or Reporting frameworks label May 19, 2022
@troopa81
Copy link
Contributor

Did you enable the force vector output option when exporting ? Do you have the same issue if your disable all masks?

@antoniolocandro
Copy link
Contributor Author

antoniolocandro commented May 24, 2022

@troopa81

This are my export settings

I updated dev ver today
QGIS version
3.25.0-Master
QGIS code revision
a96368e

image

I get the export out of bounds stuff and today interestingly 583MB and 30 min. Last time I tried the export was about 3-4 min

image

Now I tried disabling that option

image

and it works as expected
image

So I guess the problem is on vector output the clip is not set correctly and this should be the bug, also to note the red is a bit different in intensity between both shots which is also very weird

@github-actions
Copy link

github-actions bot commented Jun 8, 2022

The QGIS project highly values your report and would love to see it addressed. However, this issue has been left in feedback mode for the last 14 days and is being automatically marked as "stale".
If you would like to continue with this issue, please provide any missing information or answer any open questions. If you could resolve the issue yourself meanwhile, please leave a note for future readers with the same problem and close the issue.
In case you should have any uncertainty, please leave a comment and we will be happy to help you proceed with this issue.
If there is no further activity on this issue, it will be closed in a week.

@github-actions github-actions bot added the stale Uh oh! Seems this work is abandoned, and the PR is about to close. label Jun 8, 2022
@agiudiceandrea
Copy link
Contributor

Some issue reported for QGIS 3.26.0: https://lists.osgeo.org/pipermail/qgis-user/2022-July/051583.html.

@github-actions github-actions bot removed the stale Uh oh! Seems this work is abandoned, and the PR is about to close. label Jul 2, 2022
@agiudiceandrea
Copy link
Contributor

agiudiceandrea commented Jul 4, 2022

I think the Feedback label should be removed.

@Pedro-Murteira Pedro-Murteira removed the Feedback Waiting on the submitter for answers label Jul 4, 2022
@troopa81
Copy link
Contributor

troopa81 commented Jul 6, 2022

I take a closer look of this issue.

So I guess the problem is on vector output the clip is not set correctly and this should be the bug

This is well known and described here :

In the exported pdf, result is not correctly clipped to the frame when mask painter path is involved. It's because the mask clipping doesn't fit well with the overall clipping defined in QgsLayoutItemMap even with the option Qt::IntersectClip. I opened 2 QT BUG regarding this issue (https://bugreports.qt.io/browse/QTBUG-100422 and https://bugreports.qt.io/browse/QTBUG-100420). There are maybe dirty workaround but it will be IMHO better to wait for an upstream fix (second one has already been fixed in Qt 6).

It's Qt upstream issues, nothing we can do about except hoping they will eventually fix the issues I reported.

also to note the red is a bit different in intensity between both shots which is also very weird

Could you share a project with sample data so I can reproduce ?

@troopa81
Copy link
Contributor

Qt upstream issue, I close

@troopa81 troopa81 added the Upstream Needs changes in an upstream library (like Qt, Proj, GDAL, ...) label Oct 12, 2022
@nyalldawson nyalldawson reopened this Oct 14, 2022
@nyalldawson
Copy link
Collaborator

We could work around this downstream eg by using the geos library to do the clipping instead of doing it at painter time. (Possibly with performance benefits as a result). I'll reopen, since it's not blocked by an upstream issue.

@troopa81
Copy link
Contributor

We could work around this downstream eg by using the geos library to do the clipping

I fail to see how you could do that. Sure you can get the mask as a geos geometry, but when it comes to clipping, you gonna clip the geometry of what you want to paint (a line for instance) not the result of the painted line (with defined QPen/QBrush).

clip

@nyalldawson
Copy link
Collaborator

@troopa81 good point 👍

@troopa81
Copy link
Contributor

If you don't mind, I close the issue again

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 Upstream Needs changes in an upstream library (like Qt, Proj, GDAL, ...)
Projects
None yet
Development

No branches or pull requests

5 participants