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

Marker Line broken for curved geometries #39750

Closed
andreasneumann opened this issue Nov 2, 2020 · 5 comments · Fixed by #41064
Closed

Marker Line broken for curved geometries #39750

andreasneumann opened this issue Nov 2, 2020 · 5 comments · Fixed by #41064
Assignees
Labels
Bug Either a bug report, or a bug fix. Let's hope for the latter! Regression Something which used to work, but doesn't anymore Requires Tests! Waiting on the submitter to add unit tests before eligible for merging Symbology Related to vector layer symbology or renderers

Comments

@andreasneumann
Copy link
Member

The Marker Placement Options

  • On Every Vertex
  • On Every Curve Point

are broken in Current master for the following Geometry Types:

  • MultiCurve
  • CurvePolygon
  • MultiSurface
  • CompoundCurve

image

It seems like the markers are drawn on segmented points (quite densely) that have nothing to do with the actual original vertex points in the curves (original curve points and vertices).

In QGIS 3.10 it still worked ok for CurvePolygon and "CompoundCurve", but failed for "MultiSurface" and "MultiCurve", in QGIS 3.14 and later all 4 geometry types are broken.

This needs to be backported to QGIS 3.10 and 3.16.

Attached is a test file (Geopackage)
CurveTests.zip
and project for all 4 geometry types that can contain curves.

@andreasneumann andreasneumann added Bug Either a bug report, or a bug fix. Let's hope for the latter! Regression Something which used to work, but doesn't anymore Requires Tests! Waiting on the submitter to add unit tests before eligible for merging Symbology Related to vector layer symbology or renderers labels Nov 2, 2020
@andreasneumann
Copy link
Member Author

This circle is made of two circular arcs, so only 4 vertices should be drawn in this marker line. But with the broken implementation we see >100 (didn't count) markers instead of just 4!

image

@nyalldawson nyalldawson self-assigned this Jan 18, 2021
nyalldawson added a commit to nyalldawson/QGIS that referenced this issue Jan 19, 2021
Don't segmentize and process the whole geometry upfront, and instead
defer the segmentization and processing (eg clipping) to be performed
on a part-by-part basis. This ensures that we ALWAYS have access to
the corresponding original geometry when we get around to rendering
each part instead of only its segmentized and processed version.

Fixes marker line symbol layer renders vertices for segmentized
versions of curved geometries instead of the actual vertices, and
also fixes handling of multi* curved types with the marker line
vertex/curve point interval types.

Possibly also results in faster rendering for certain multipart
geometries too, as the simplification and segmentization is now done on a
part by part basis, so can potentially be skipped for some parts alone...

Fixes qgis#39750
nyalldawson added a commit that referenced this issue Jan 19, 2021
Don't segmentize and process the whole geometry upfront, and instead
defer the segmentization and processing (eg clipping) to be performed
on a part-by-part basis. This ensures that we ALWAYS have access to
the corresponding original geometry when we get around to rendering
each part instead of only its segmentized and processed version.

Fixes marker line symbol layer renders vertices for segmentized
versions of curved geometries instead of the actual vertices, and
also fixes handling of multi* curved types with the marker line
vertex/curve point interval types.

Possibly also results in faster rendering for certain multipart
geometries too, as the simplification and segmentization is now done on a
part by part basis, so can potentially be skipped for some parts alone...

Fixes #39750
nyalldawson added a commit to nyalldawson/QGIS that referenced this issue Jan 19, 2021
Don't segmentize and process the whole geometry upfront, and instead
defer the segmentization and processing (eg clipping) to be performed
on a part-by-part basis. This ensures that we ALWAYS have access to
the corresponding original geometry when we get around to rendering
each part instead of only its segmentized and processed version.

Fixes marker line symbol layer renders vertices for segmentized
versions of curved geometries instead of the actual vertices, and
also fixes handling of multi* curved types with the marker line
vertex/curve point interval types.

Possibly also results in faster rendering for certain multipart
geometries too, as the simplification and segmentization is now done on a
part by part basis, so can potentially be skipped for some parts alone...

Fixes qgis#39750

(cherry picked from commit 71090b0)
@andreasneumann
Copy link
Member Author

thank you @nyalldawson !

@andreasneumann
Copy link
Member Author

@nyalldawson - can this be backported to 3.16 ?

@nyalldawson
Copy link
Collaborator

@andreasneumann it was added to the queue for 3.16.5 (#41054). It's invasive, so I'm not comfortable including it in 3.16.4

@andreasneumann
Copy link
Member Author

Thanks @nyalldawson - 3.16.5 is fine for us.

nyalldawson added a commit to nyalldawson/QGIS that referenced this issue Feb 19, 2021
Don't segmentize and process the whole geometry upfront, and instead
defer the segmentization and processing (eg clipping) to be performed
on a part-by-part basis. This ensures that we ALWAYS have access to
the corresponding original geometry when we get around to rendering
each part instead of only its segmentized and processed version.

Fixes marker line symbol layer renders vertices for segmentized
versions of curved geometries instead of the actual vertices, and
also fixes handling of multi* curved types with the marker line
vertex/curve point interval types.

Possibly also results in faster rendering for certain multipart
geometries too, as the simplification and segmentization is now done on a
part by part basis, so can potentially be skipped for some parts alone...

Fixes qgis#39750

(cherry picked from commit 71090b0)
nyalldawson added a commit that referenced this issue Feb 19, 2021
Don't segmentize and process the whole geometry upfront, and instead
defer the segmentization and processing (eg clipping) to be performed
on a part-by-part basis. This ensures that we ALWAYS have access to
the corresponding original geometry when we get around to rendering
each part instead of only its segmentized and processed version.

Fixes marker line symbol layer renders vertices for segmentized
versions of curved geometries instead of the actual vertices, and
also fixes handling of multi* curved types with the marker line
vertex/curve point interval types.

Possibly also results in faster rendering for certain multipart
geometries too, as the simplification and segmentization is now done on a
part by part basis, so can potentially be skipped for some parts alone...

Fixes #39750

(cherry picked from commit 71090b0)
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! Regression Something which used to work, but doesn't anymore Requires Tests! Waiting on the submitter to add unit tests before eligible for merging Symbology Related to vector layer symbology or renderers
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants