JOSM / areaselector

JOSM Area Selection Plugin
https://github.com/JOSM/JOSM-areaselector/wiki
19 stars 3 forks source link

replacing a building while keeping history in fairness (important) #23

Open a-pirard opened 8 years ago

a-pirard commented 8 years ago

This is requesting to use AreaSelector without fear of being unfair. It's often much quicker to make a new building with AS than to modify a badly mapped one. This is a suggestion for doing it easily while fairly keeping the history of former contributors. Possible suggestion: 1: while Ctrl held down in OK dialog, or by other means, cursor temporarily switches to Select mode

  1. doing so, the user adds the old, bad way to the selection
  2. then he clicks an "OK & Replace Geometry" button and AS calls Tools>Replace Geometry just after finishing the way.

That's all there is for fairness and avoiding a lot of clicking.

BTW, the same process of selecting a second way can be used to implement a "Pick other way's tags" button. It could be used to continue adding buildings with the same tags as a partially mapped street. Or to pick City and Post Code of an other street.

TIA !!!

r00tat commented 7 years ago

What should happen with the preexisting tags, should they be copied to the new building?

a-pirard commented 7 years ago

On 2016-11-12 09:46, Paul wrote:

What should happen with the preexisting tags, should they be copied to the new building?

Paul,

Try Replace Geometry https://wiki.openstreetmap.org/wiki/JOSM/Plugins/utilsplugin2#Replace_geometry_.28Ctrl.2BShift.2BG.29. It merges the tags and, when there is a conflict, you will see it pop a dialog for the user to choose which tags to merge and containing red dots for the conflicts.

What I am suggesting is just to help the mapper use RG because he can't use it while AS is running. He must 1) remember all the building he's made with AS in this session (if he forgets one and closes the session, the RG feature is lost) 2) select both ways two by two and click RG.

The improvement is just: after AS has selected its new way and set its tags, let the user select the old way and then let AS call RG. I let you figure the most comfortable way to do that.

Cheers

André.

r00tat commented 7 years ago

implemented with 2.4.0.

If you click near to an existing wall it will try to replace the existing building, instead of create a new one. Let me know, if this is a suitable solution for you.

a-pirard commented 7 years ago

On 2017-07-18 11:34, Paul wrote:

implemented with 2.4.0.

If you click near to an existing wall it will try to replace the existing building, instead of create a new one. Let me know, if this is a suitable solution for you. Hi Paul,

It's an excellent idea you've had to identify the existing building before invoking AreaSelector. But that's not the way to do it. You must not simply remove the existing building but, as I said, you must invoke Replace Geometry to do it. For Replace Geometry to work, both existing building and new building must be selected. Try it and see how it keeps history and merges conflicting tags. Is there a way to have Area Selector select the existing building way? Such as Alt+click? That would be great. Selecting it that way and have AreaSelector remember that it made the selection. Under both conditions (way selected and AS did it), you can invoke AreaSelector before ending. And, while we are at it, under both conditions again, you should not "merge nodes" with those of the selected way of the existing building that is going to be removed.

I hope that it can easily be done.

I found a bug with the present code but it's not useful to describe it if you reshuffle the code.

r00tat commented 7 years ago

Hi André,

I tried replace geometry, but I'd did not replace the building, but combine it somehow.

I implemented it as it will keep the way, but replace all the nodes in the way. With that procedure it will also keep the history.

If you found a bug, please open a new issue! a-pirard notifications@github.com schrieb am Mi. 19. Juli 2017 um 21:38:

On 2017-07-18 11:34, Paul wrote:

implemented with 2.4.0.

If you click near to an existing wall it will try to replace the existing building, instead of create a new one. Let me know, if this is a suitable solution for you. Hi Paul,

It's an excellent idea you've had to identify the existing building before invoking AreaSelector. But that's not the way to do it. You must not simply remove the existing building but, as I said, you must invoke Replace Geometry to do it. For Replace Geometry to work, both existing building and new building must be selected. Try it and see how it keeps history and merges conflicting tags. Is there a way to have Area Selector select the existing building way? Such as Alt+click? That would be great. Selecting it that way and have AreaSelector remember that it made the selection. Under both conditions (way selected and AS did it), you can invoke AreaSelector before ending. And, while we are at it, under both conditions again, you should not "merge nodes" with those of the selected way of the existing building that is going to be removed.

I hope that it can easily be done.

I found a bug with the present code but it's not useful to describe it if you reshuffle the code.

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/JOSM/areaselector/issues/23#issuecomment-316494214, or mute the thread https://github.com/notifications/unsubscribe-auth/ABqw3RgNhOZWoiNR758SDnfAPZMrO0_4ks5sPltGgaJpZM4Jgb-9 .

--

Mit freundlichen Grüßen Paul Wölfel

a-pirard commented 7 years ago

On 2017-07-19 22:06, Paul wrote:

Hi André,

I tried replace geometry, but I'd did not replace the building, but combine it somehow. Strange. You must have met special conditions. You should open a bug. I've never had any problem. I implemented it as it will keep the way, but replace all the nodes in the way. With that procedure it will also keep the history. Right for the history. But regarding tag conflicts resolution, it's a bit different. You have none. 1: See the bug I opened. Normally, AS's tag must override an existing one. 2: But supposing I tag a series of building=houses and I replace a building=hangar. Shouldn't hangar be kept?

Selecting the area to be replaced allows it to be fully outside the new one and prevents replacing an area by mistake. But one can extend the first one inside the new area and there's little chance that an area inside a new one should be kept.

So, all in all, it's fair

Paul, I have a list of snapshots of the most common mistakes with the Walloon PICC server. Are you interested? I insist of putting all that in a single bug. Particular issue can be split later. My problem is that both the server and AS can change any time without warning. So that what I say in the morning can no longer be true in the evening. Also that I have not enough insight of your program to make realistic suggestions.

The most annoying is when one building wall attaches another in a L shape. The corner of the L is not made a node of the other wall.

Hoping this will help. Cheers

André.

r00tat commented 7 years ago

I fixed #28.

I implemented Areaselector to automatically try to find the existing building, because always switching between tools is not so a nice usability.

If Areaselector should replace an existing building, which was previously selected, I would have to write a new Action because they can't be combined in one.

a-pirard commented 7 years ago

On 2017-07-28 11:45, Paul wrote:

I fixed #28 https://github.com/JOSM/areaselector/issues/28.

I implemented Areaselector to automatically try to find the existing building, because always switching between tools is not so a nice usability.

If Areaselector should replace an existing building, which was previously selected, I would have to write a new Action because they can't be combined in one.

I'm afraid I don't understand that well. Your building replacement is very well done, but, alas, it does not support tag merging and conflict resolution. Avoiding the repeated switching between tools by the user is indeed the reason why I suggested that AreaSelector could call Replace Geometry (as a subprogram) and I suppose it can do that. Replace Geometry needs exactly two buildings to be selected. The old building must be in the OSM database, the new one may not. That's why Replace Geometry must be done immediately. I suppose that clicking at the cursor of AreaSelector while e.g. pressing the Alt key may be used to select the old building before clicking to create the new building.

Tests: Create a new building without tags. Select this building and any old building. Click Replace Geometry -> the new building has the same tags as the old one. Same after adding a tag to new building:

Hoping it can help.

André.