-
-
Notifications
You must be signed in to change notification settings - Fork 3.1k
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 offset line shows perpendicular tags issue #53165
Comments
@MrLando1, with "LRS" do you mean the extarnal Python "LRS" plugin https://plugins.qgis.org/plugins/lrs/? If yes, does the issue occur without the need to use such plugin? Could you please provide sample layer and project with which the issue does occur? |
Hi @agiudiceandrea Yes, It was the external python LRS plugin, but I think that isn't what is causing the issue as the issue doesn't occur in all versions of QGIS.. I can confirm that the issue occurs in v3.28.2 and v3.30.1 I have just created a Test project. I created four network lines, one relatively straight, one concave curve, cone convex curve and a spline (S). I created dummy data in a csv and added it to the project. I used v.to.points to create start and end nodes and then changed the Length field to show 0m for the start. When looking at the data as is, there isn't an issue, but as soon as I do an offset, the tags appear. To show this clearly, I had done an offset of -40 meters at scale see attached project. |
I do see those "tags" both using positive and negative offset. The image shows a SINGLE layer with 3 symbology layers being the original line, a left offset and a right offset (both offsets being 40 units). This is happening for me with QGIS 3.31.0 as of The problem is probably with the line NOT being a single line but a set of joined lines, with the offset curve algorithm not considering the joins, as better shown in this picture: |
I've just tested the same project with QGIS Release 3.22 (using the same GEOS version) and I see the same behaviour |
MrLando1 what version of GEOS is your working QGIS reporting ? |
FID=43 has this WKT: |
Smaller project with ONLY the single geometry is here: SmallCase.zip |
This is the operation which changed behaviour between GEOS-3.10 and GEOS-3.11. In the log we have the return from GEOS-3.11, which is the almost-full-ring one: GEOSOffsetCurve(LINESTRING (417.9785426266025752 432.5653800140134990, 447.6161954912822694 436.0936720217578113, 450.6571140550076962 438.0288020166335627), 133.819, 0, 2, 2) returned LINESTRING (409.6582865640766045 502.4555309383532631, 402.1593597874252737 565.4465158614327720, 431.7970126521049679 568.9748078691770843, 439.7066040716936186 502.5342399454674478, 415.1760359914131868 493.7847818372570714) |
Interesting note: using the deprecated GEOSSingleSidedBuffer_r C-API signature works better for the above case |
A work-around for this problem is to always use a Quadrant Segments value of at least 8. (Note that for Offset Curves specified with a Mitre Join the Quadrant Segments value is essentially irrelevant for the output. It should be forced to 8 internally in the GEOS OffsetCurve code - this will be fixed at some point.) |
Works around a GEOS bug artifacts when using GEOS 3.11.{0,1,2} Closes qgisGH-53165
Thanks @dr-jts - I've filed #53234 with the workaround and will keep an eye on locationtech/jts#980 to port that fix to GEOS as soon as ready |
References qgis/QGIS#53165 References libgeos#897
* References qgis/QGIS#53165 * References #897
* References qgis/QGIS#53165 * References #897
* References qgis/QGIS#53165 * References #897
Works around a GEOS bug artifacts when using GEOS 3.11.{0,1,2} Closes qgisGH-53165 in 3.28 branch
Works around a GEOS bug artifacts when using GEOS 3.11.{0,1,2} Closes GH-53165 in 3.28 branch
What is the bug or the crash?
I'm adding data to a road network using LRS. I am offsetting the data to show different lanes of the road. In the example below I only have data for 1 lane.
However, some of the data shows an additional perpendicular "tag" towards the original network line. At some scales the "tag" disappears if I change the dimension to "meters at scale". If there is data for multiple lanes, then the tag is showing for the data for each lane. I have checked the network line (using Vector > Geometry Tools > Extract Vertices) and there are no additional vertices which could be responsible for this.
I tried turning off the layer's rendering properties simplify geometry setting
I'm using 3.28.2 but it also occurs on 3.30.1. HOWEVER, I have just discovered that if I load the project into 3.18.3, then issue does not occur (see 2nd image).
Steps to reproduce the issue
Versions
Issue occurs on 3.28.2 and 3.30.1.
HOWEVER, I have just discovered that if I load the project into 3.18.3, the issue does not occur
Supported QGIS version
New profile
Additional context
No response
The text was updated successfully, but these errors were encountered: