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 operation to snap node/vertex to underlying way #10698

Open
sekerob opened this issue Jan 21, 2025 · 5 comments
Open

Add operation to snap node/vertex to underlying way #10698

sekerob opened this issue Jan 21, 2025 · 5 comments
Labels
help wanted For intermediate contributors, requires investigation or knowledge of iD code operation An editing operation / edit menu item

Comments

@sekerob
Copy link

sekerob commented Jan 21, 2025

Description

Done lots of battle with this, Snapping (to get the small white node to link to another line to turn larger grey as evidence the command was executed. Sometimes it is only working after uploading e.g. two new buildings, with offset (none aligned facades,), where 1 building corner meets the wall of the second building. Only after saving can I grab the corner node,,wiggle it with the mouse, to get it to snap to the adjacent building outline.

Since I often do small correction on a the small touch screen of my phone, it would be nice to be able to select such a white node top of an adjacent area outline, or way. The selection works on touch screen,then holding the node brings up the pop up menu with all the editing bells, but on there no option to make that node snap confirmed by turning grey. Could imagine having the + re-used for this when only a single node is selected.

Sample:

Image

Screenshots

No response

@sekerob sekerob changed the title Right click pop-up menu node snap to underlying way. Right click pop-up menu node to snap to underlying way. Jan 21, 2025
@tyrasd tyrasd added the operation An editing operation / edit menu item label Jan 29, 2025
@tyrasd tyrasd changed the title Right click pop-up menu node to snap to underlying way. Add operation to snap node/vertex to underlying way Jan 29, 2025
@tyrasd
Copy link
Member

tyrasd commented Jan 29, 2025

Agree, there should be an operation in the edit menu for this.

@tyrasd tyrasd added the help wanted For intermediate contributors, requires investigation or knowledge of iD code label Jan 29, 2025
@sekerob
Copy link
Author

sekerob commented Jan 30, 2025

For inspiration, since both ID and JOSM are open source Java based, the equivalent shortcut command in latter is simply selecting the node/vertex close to a line and just 'n'. Since I flip flop between half dozen editors on the Android and 3 on the desktop, having the same would be ideal.

https://josm.openstreetmap.de/wiki/Help/Action/JoinNodeWay

Not sure why the shortcut list says J, but the command which works for me is 'n' . As an example, misplaced this stop (intentionally), next to a way. ( Maybe because I have the Utils2plugin for JOSM, indispensible)

Image

Select it and hit 'n'. It snaps.

Image

As the wiki page says, sometimes you need to zoom out to establish proximity in screen pixels (???). Not too much as then on the map it could jump a street length.

"Note: This action only works if the monitor distance between the node and the way is tiny. If it does not work, simply zoom further out. "

@tyrasd
Copy link
Member

tyrasd commented Jan 31, 2025

N is already used as a shortcut in iD to create a new note (if the notes layer is activated).
J would still be available…

@ChaitanyaKadu03
Copy link
Contributor

I’ve been thinking about the snapping feature with the 'J' shortcut. What do @tyrasd @tordans @sekerob think about these two possibilities?

Auto-Snap to Nearest: Press 'J,' and the selected node snaps to the nearest way (or node on that way) within, say, 10 pixels. This would be fast and similar to JOSM’s 'n' behavior.

Manual Snap: Press 'J,' then click a specific way or node to snap the selected node to it. This gives more control, especially in dense areas.

Which do you prefer for iD? Or maybe both could work (e.g., 'J' for auto, 'Shift+J' for manual)? I am actively working on this issue.

@sekerob
Copy link
Author

sekerob commented Mar 12, 2025

My request was mostly driven by touch-screen operations where I don't have an option to select any character... the node on hold should bring up that pop up menu which shows in a desktop webbrowser edition of ID too and then pick snap. Suppose the more you're zoomed out with your proposed 10 pixels limit would represent a greater distance on the map?

Of course when on a desktop selecting a node and hitting a shortcut key would be excellent, even faster. If picking a specific position on a target line improves the experience great,... you could then go for not-the nearest.

Short, on a 7 inch phone screen, it's already a challenge to set nodes in the right place, so might have to think about using a touch-screen sensing pen to refine the positioning. Fingertips are just not accurate enough

(Curiously the 'disconnect' right click menu option has been there long as I can remember, but then try reconnecting). For sure, would the node snap to the wrong line, it would have to be truly 'the nearest'. If it goes the wrong way there's always the step revert right top.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted For intermediate contributors, requires investigation or knowledge of iD code operation An editing operation / edit menu item
Projects
None yet
Development

No branches or pull requests

3 participants