-
Notifications
You must be signed in to change notification settings - Fork 1.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
create a 'divide' operation #9020
base: develop
Are you sure you want to change the base?
Conversation
Nifty, this will tempt me to start nanomapping the individual modules of solar panels. 😉 I wonder if it would be possible to replace the two prompts with something more interactive. Perhaps you hit the shortcut key, then move the mouse along the long and short axes to control the number of divisions. It’d be similar to how you can scrub the mouse cursor while rotating a feature, except that this gesture would snap to widths that evenly divide the area. For things like parking spaces, it’d be more convenient to eyeball the right width than to count the divisions manually.
If we expect this operation to be used somewhat less frequently than, say, the merge operation, how about keeping it available in the context menu for all areas but avoid assigning a keyboard shortcut? It’s becoming ever more difficult to assign memorable single-key shortcuts without modifiers, especially in locales that translate them. Currently, operations’ availability depends on the selected geometry type, but it would be more difficult to communicate to the user that this operation depends on certain tags. |
That's a good idea - my concern was also that it will clutter the context menu, which already has 8 items, but maybe that's not a problem...
👍 I'll give this some thought, another option could be to replace the two prompts with a modal. That modal could have a preview similar to the turn-restriction editor. Both options will be quite complicated. |
Probably out of scope for this PR, but may be worth considering as a follow up: Would be nice if this supported use of custom dividing line (something like: draw way across area, select both, perform divide operation). Useful for things like drawing a footprint and splitting into non-uniform buildings or building parts, or splitting land use to re-tag a section. |
Vector drawing tools have a similar operation. It isn’t the most discoverable, but it makes a lot of sense once you’re made aware of it, similar to how iD supports punching holes in polygons using the merge operation. In that case, you could even hook it up to the split operation, so you can select an area and a line that cuts across it, but don’t select a vertex, then split the area along the line. It would be quite outside the scope of this PR, but it might be worth considering how to make the UX for this feature consistent with what might be possible for that other feature. |
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.
I found the following issues / corner cases while playing around with it:
- if the input geometry is concave, the result will have intersecting and/or self-intersecting geometries:
- when applied to an area which shares an edge with a neighboring area (or touching line), the neighboring (or touching) feature does not receive a vertex at the newly introduced split position (which potentially also results in a validator warning messages about intersecting geometries)
In general, I would be slightly more inclined to add support "divide operation" which is more flexible, as outlined in #9020 (comment), rather than specialized operation which only properly works in a narrow set of use cases.
It would be nice if we could also do this with ways, for if we know there's windows/doors or extensions along a building wall. |
It's been 2 years... anything going on? |
Looking at the initial video, I wonder...
|
This PR creates a "divide" operation, similar to the JOSM gridify plugin. It lets you divide an area into a grid of smaller areas. This is useful for mapping parking spaces, terraced houses, and camp pitches.
You can try it out here. Select an area and press K.
Closes #6988
divide2.mov
More Examples