-
-
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
[elevation profile] add tolerance for lines and polyons #54964
[elevation profile] add tolerance for lines and polyons #54964
Conversation
49b1c3c
to
3704fb4
Compare
I have tested it locally, this unfortunately generates an incorrect display for raster data with NaN values. Its similar to #54422 but not exactly the same. The gap that should be created by the NaN values will not be filled in the "Fill" modes nor in the "Line" mode. Maybe this screenshot helps in compare with #54642 it is approximately the same profile |
Thanks! I will add a test and fix this regression. |
3704fb4
to
eac6490
Compare
@fiddlersfan I add a test and do some fixes @nyalldawson can you have a look? Thanks |
eac6490
to
7bce217
Compare
Thanks for the test and fix! I just tested it again and the regression is fixed. |
852c881
to
b6791d9
Compare
ef2f2ac
to
31cdbd2
Compare
@nyalldawson at last, all checks are green! Can you review this PR please? Regards. |
This one will take some time for me to review -- there's a lot here! |
@nyalldawson indeed! |
The QGIS project highly values your contribution and would love to see this work merged! Unfortunately this PR has not had any activity in the last 14 days and is being automatically marked as "stale". If you think this pull request should be merged, please check
|
31cdbd2
to
4b0334c
Compare
rebase from upstream/master |
4b0334c
to
c8ade4a
Compare
The QGIS project highly values your contribution and would love to see this work merged! Unfortunately this PR has not had any activity in the last 14 days and is being automatically marked as "stale". If you think this pull request should be merged, please check
|
…when intersection is empty as we only processing part of the feature's geometry
…etDistanceWithin` when tolerance>0 as some providers as improved performances with setDistanceWithin
b3e2758
to
a94bbdc
Compare
rebased ! @nyalldawson can you have a look please ? |
@benoitdm-oslandia LGTM! Just the test failure to fix now -- looks like it just needs a mask update for qt 6 (see #54964 (comment)) |
a94bbdc
to
f0bd1ac
Compare
In case the geometry is invalid, we shift all coordinates by an epsilon to ensure the 2D equivalent will be topologically correct. This is just a fix, a proper 3D geometry library is needed (like SFCGAL)!
…mask for vector_layer_map_units_tolerance
f0bd1ac
to
83a7a50
Compare
fix test by adding a mask and add comments |
@nyalldawson all green! Can you merge? |
This pull request has been tagged for the changelog.
You can edit the description. Format available for credits
Thank you! |
@benoitdm-oslandia A documentation ticket will be opened at https://github.com/qgis/QGIS-Documentation when this PR is merged. Please update the description (not the comments) with helpful description and screenshot to help the work from documentors. Thank you! |
@nyalldawson thanks for your time! |
Improve elevation profile tool by adding tolerance support for lines and polygons (2D/3D). This allows to create, according to the elevation curve, a 2D view version of a 3D scene slice.
Without tolerance support, a line or a polygon is fully displayed in the elevation profile when it intersects the profile curve. By adding support for Tolerance, only the parts of the lines and polygon which intersect the gray area are taken into account to compute the elevation profile.
Here is a screencast of a sample project with ours fixes. The more the tolerance increases the more we capture new objects or parts of objects (as lines or poylgons). We can see the captured polygons growing:
Here is another screencast with drillhole representations (from OpenLog plugin):
Nota bene: extruding closed polygons is not trivial because it is equivalent to representing a 3D object (like a 3D closed polygon reprojected into a 2D closed polygon in the elevation profile tool + the extrusion dimension). We are still working to find a good solution but right now the polygon extrusion is not showing when tolerance is enabled.
Funded by CEA/DAM @renardf
Thanks to @jmkerloch @ptitjano @lbartoletti @troopa81
OLD PR description:
This PR adds the support to tolerance for lines and polygons by using a buffer.
Here is a screencast of a sample project from the master:
and the same version with ours fixes (more zoomed in the elevation profile tool to show the captured lines):
Extruding closed polygons is not trivial because it is equivalent to representing a 3D object (like a 3D closed polygon reprojected into a 2D closed polygon in the elevation profile tool + the extrusion dimension). We are still working to find a good solution but right now the polygon extrusion is not showing when tolerance is enabled.
cc @ptitjano @lbartoletti @jmkerloch @troopa81
Funded by CEA/DAM @renardf