-
-
Notifications
You must be signed in to change notification settings - Fork 3k
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
[advanced digitizing] Add circles intersection digitizing tool #57648
Conversation
4c68819
to
c17a5f1
Compare
While I agree that this functionality is missed in QGIS, the UX of this implementation is not really improved over the previous attempt #45904 Currently, a single circle constraint exists by using the Distance constraint, and imho we should take advantage of that and use it at least for one of the two intersecting circles. How about we add the distance circles as guides too, then allow snapping on their intersections? |
I'm +1 to have this kind of tool in QGIS, but we were refused this one because we were adding a CoGO toolbar (later, I think there were other toolbars, but hey ...). We finally made a plugin for it, with other CoGo tools that I didn't release because we moved on to other subjects and the spirit of the project at the time no longer suited me or my colleague... Tired of the feeling of differences in treatment, we didn't open the QEP, since we felt that certain more important changes were often made without this "precious discussion"... Nevertheless, I'll support you @nirvn so that we can finally have this kind of tool in QGIS! And I'm willing to come back and support you. Let's see how we can mutualize this with a UI/UX that suits us and our use cases. |
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
|
While we hate to see this happen, this PR has been automatically closed because it has not had any activity in the last 21 days. If this pull request should be reconsidered, please follow the guidelines in the previous comment and reopen this pull request. Or, if you have any further questions, just ask! We love to help, and if there's anything the QGIS project can do to help push this PR forward please let us know how we can assist. |
Good reminder bot, I'll push this forward over the weekend. |
fcacf2a
to
0c89122
Compare
@uclaros , hey, sorry for taking so long to engage with your comment, life and priorities got in the way :) While I appreciate what you are suggesting here, I do not think a COGO tool should rely on construction guides to work. Very often, these operations are one off. Most basic case here: I'm back from my field survey where I took accurate reading of a pair of reachable points and distances to map out the intersecting point. I've got no need here for construction guides as these two circles will never be re-used. So IMHO, I would argue here that COGO operations, very often ephemeral, should be kept separate from construction guides. What I very much do like in your suggestion is adding the possibility to add circular construction guides when the distance is looked during construction mode. That's something we should consider in a separate PR. |
@uclaros , @lbartoletti , I do feel this is a UI improvement from #45904 in quite a few fronts here: 1/ the big difference here is that it integrates with the CAD tool and ends up adding a vertex to any map tool that shares the CAD tool class. This means support for adding a vertex using this tool while digitizing line or a polygon (think about the need to trace a plot of land that includes circle-intersection points). The previous PR was a separate process that did not plug into the existing digitizing framework, only worked for point geometry layers, and didn't play along other map tools (e.g. annotations). 2/ the UI does not involve adding a new toolbar in our main windows but rather add to the CAD panel, which IMHO gives it a better location while avoiding cluttering the main window toolbar area. @lbartoletti , sorry you were left frustrated by the process and glad to read I've got your support on this one. On the plugin side of things, the PR allows for other tools to be prototyped and registered via plugin. If your unreleased COGO plugin included other tools, I'd love to see if it's possible to port them to this framework. It'd make for a great QGIS 3.40 plugin :) |
A screencast of what I was explaining above in terms of integration with map tools: vokoscreenNG-2024-07-28_16-32-25.mp4Here, I was not able to get the top-right corner of the rice field (too muddy), so I had to take two points + distances. The video demonstrates how I could nevertheless go back to the office and create the plot polygon by using the COGO tool to add the 4th vertex. |
0c89122
to
36ad5f9
Compare
@nyalldawson , I've (partially) addressed the comment you made in #45904 by adding a registry of advanced digitizing tools (that'll be useful to you @lbartoletti ) and transforming the toolbar action into a drop down menu that will contain all the registered tools. ATM, I think I'm -1 on doing the gimp-like subpanel because a/ we have only one tool, and more importantly b/ these tools can still rely on the CAD constraint widgets, so opening a subpanel would just interfered with that. I do think the toolbar drop down menu does embrace the spirit at least of a tools container :) |
@nirvn Ok, i've done a review based on the code as is. I'm fine with the new GUI approach here too, we can always revisit the tool box concept in future if/when needed. Keen to hear @uclaros / @lbartoletti 's thoughts on the new approach too! |
8384b41
to
9fab4fc
Compare
@nirvn Thanks for being open to discussion! I'd be very happy with the resulting UX if the following were tuned:
|
@nirvn Thanks. I'm not able to review and test this PR at the moment. But, be sure that, I'll be happy to review and test at the end of August. |
68f00d4
to
a83c973
Compare
@uclaros , thanks for the feedback. I've implemented the UX logic you've described (point 1 through to 4). With regards to project CRS, I'll think of a way to do that in a follow up PR (I'm thinking of a tool's flags() that would return whether it supports geographic coordinates. @lbartoletti , OK, no rush. I will merge this PR now as I think we're all in agreement with the foundation here, and address your review in a month in follow up PRs. Glad we're moving forward on this 🙏 |
a688e32
to
53040f0
Compare
Thanks @nirvn for handling my suggestion. However I do not see how 4 is implemented, am I missing something? Regarding 3, we should probably first check if point 1 has been set, or the user might be trying to do distance, point, distance, point I didn't get a chance to build and test yet, but shouldn't |
ca2aded
to
99c1c1d
Compare
@uclaros , heh, I had meant 1-3, but then you insisting on 4 led to it being implemented ;) Also, I've made the digitize toggles mutually exclusive, good call. As for the rest, let's tweak things in follow up PRs. I'm not sure we should overthink the logic too much here though. That said, big thanks for the feedback, it made the feature much better 🙏 |
@nirvn 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! |
@nirvn |
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.
@nirvn I would have appreciated it if you waited for the review process to complete before merging this!
A couple other issues that need to be resolved before I'd stop considering this half-baked:
- Handle
esc
button: users are trapped in this mode and cannot abort unless they do add a point. - Handle right click: right click should do the same as
esc
, right now it forwards the right click to the map tool - Once a center is placed and focus goes into its radius widget, mouse move should track the distance from that center and update the spinbox value, similar to how
d
works for advanced digitizing panel.
@uclaros , good catch regarding the ESC and right-click handling, I've addressed these alongside the label renaming suggestions you dropped in this follow up PR: #58289 As for merging this to begin with, after having answered to reviews and implemented UI/UX suggestions from you and others over the last 7 weeks, without an explicit request for further review I think it was fair to merge to get as much testing as we can. On a friendly note, I'm not sure labeling efforts shown this PR as "half-baked" is a constructive way to go about it nor does it reflect the willingness to adopt a fair amount of what was discussed here ;) On defining the map canvas overlay widget as "ugly", what is used here is what most other map tools do (i.e. e.g. offset curve map tool, rotation map tool, scale map tool, etc.). If you feel like there's room for improvements for this well-established overlay, this can be discussed separately. We could give some tweaks a try (e.g. semi-transparent background?), but we're still a bit limited by what Qt widgets offers us. Thanks for the reviews here, you've made this a better feature; keep them coming 🙏 |
This pull request has been tagged for the changelog.
You can edit the description. Format available for credits
Thank you! |
Description
This PR adds a brand new advanced digitizing tool allowing for users to pick/digitize a point at the intersection of two circles. In action:
vokoscreenNG-2024-06-04_11-02-23.mp4
The implementation adds an abstract advanced digitizing tool class to allow for more such "COGO" tools to be added in the future (e.g. intersection between a circle and a line + bearing).
The new functionality is exposed to our python bindings, which also means people can write plugins and prototype additional functionalities in python.
(The PR temporarily includes the construction guides work, I'll rebase when that is merged)