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

Add new shared_paths function #50080

Merged
merged 1 commit into from
Sep 5, 2022
Merged

Conversation

nyalldawson
Copy link
Collaborator

Returns a collection containing paths shared by the two
input geometries. Those going in the same direction are
in the first element of the collection, those going in
the opposite direction are in the second element. The
paths themselves are given in the direction of the first
geometry.

(Exposes the GEOS shared paths functionality for use
in expressions.)

Returns a collection containing paths shared by the two
input geometries. Those going in the same direction are
in the first element of the collection, those going in
the opposite direction are in the second element. The
paths themselves are given in the direction of the first
geometry.

(Exposes the GEOS shared paths functionality for use
in expressions.)
@nyalldawson nyalldawson added Feature Expressions Related to the QGIS expression engine or specific expression functions Changelog Items that are queued to appear in the visual changelog - remove after harvesting labels Sep 3, 2022
@github-actions github-actions bot added this to the 3.28.0 milestone Sep 3, 2022
@nyalldawson nyalldawson merged commit dcdb4cd into qgis:master Sep 5, 2022
@nyalldawson nyalldawson deleted the shared_paths branch September 5, 2022 03:02
@roya0045
Copy link
Contributor

roya0045 commented Sep 5, 2022

Just for info,
I did a test with the following geometries
image
<QgsGeometry: LineString (-0.66612641815234996 0.34521880064829824, -0.63360007212708469 0.50193693569908726, -0.3484602327425797 0.50404388032508118, -0.14424635332252822 0.81523500810372773, 0.15403925685702602 0.50775693074084183, -0.09251617095436582 0.50593509260430447, -0.15072933549432732 0.6531604538087521)>
AND
<QgsGeometry: LineString (-0.786061588330632 0.50081037277147489, 0.52998379254457051 0.51053484602917343)>

Even if the lines are snapped, an empty collection is returned. This seems to confirm that the GEOS implementation checks vertex and will not care if the lines are snapped.

DelazJ added a commit to qgis/QGIS-Documentation that referenced this pull request Sep 7, 2022
@zacharlie zacharlie added ChangelogHarvested This PR description has been harvested in the Changelog already. and removed Changelog Items that are queued to appear in the visual changelog - remove after harvesting labels Oct 16, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ChangelogHarvested This PR description has been harvested in the Changelog already. Expressions Related to the QGIS expression engine or specific expression functions Feature
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants