-
-
Notifications
You must be signed in to change notification settings - Fork 2.9k
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
BUG: fix add vertex from end point for CompoundCurveZ in gpkg, fix #3… #34055
Conversation
Can you please add a unit test for this? |
Sorry for the delay, I added the tests for compound curve in the vertex tools, especially the ones about adding a extra vertex to a linestring in a compound curve layer and verifying that this is not available for circular string ! |
4987e47
to
e783a45
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The new test is much appreciated, but can we get a specific test in testqgsgeometry.cpp testing the compound curved insertVertex method in this circumstance?
Ok, I added a new test in compoundCurve function of testqgsgeometry.cpp. It verifies that a vertex can be added to a Linestring in a compoundCurve geometry. It's already tested that no extra vertex can be added to a CircularString (line 10595): //insert vertex at end
QVERIFY( !c24.insertVertex( QgsVertexId( 0, 0, 9 ), QgsPoint( 31.0, 32.0 ) ) ); |
a1cb8fc
to
f541fa3
Compare
f541fa3
to
7ab6770
Compare
Thanks @SebastienPeillet ! |
Description
#32080
As described in the issue, using a compound curve layer (in gpkg) it's not possible to extend existing entity from the end point, while it's possible from start point.
This was not possible because compound curve is composed of several part and user shouldn't be able to add an extra vertex in a part that is followed by another part. Extent from start point was available because the vertex index is 0, so we are sure there is no part before.
I fixed it by allowing vertex insert if it is for the last past (
i == mCurves.size() - 1
) of the curve and the vertex index is equal to the existing vertex count + 1Checklist
Fixes #11111
at the bottom of the commit messagescripts/prepare-commit.sh
script before each commit