osmcha-frontend icon indicating copy to clipboard operation
osmcha-frontend copied to clipboard

Detect if road is split and show only tag changes

Open tordans opened this issue 5 months ago • 2 comments

What feature would you like to see added?

When a road is split, OSMCha shows it as a new road with all the tags "added" (green). That makes it hard to see what actually changed.

Ideally, the pre-processing would recognize that this road segment was spit of and calculate the diff of tags against the original roads tags.

This would allow for much easier comparison of changes for this mapping case.

Example:

Image https://osmcha.org/changesets/167666013/?aoi=3ee95214-1a8e-4a7e-8546-5c9c0ac2b006

And this is what it would look like ideally:

Image

An alternative approach would be to allow selecting two segments in the UI and show a diff of tags calculated in the frontend. I could then select the original road and the new segment and see the diff of both tags.

Why would this be useful to you or other users?

tordans avatar Jun 16 '25 05:06 tordans

Thanks for the write up. I agree this would be useful.

There was some discussion about how to implement this feature a while back on OSM US Slack; see here. In short, it's tricky and requires imperfect heuristics, but that doesn't mean it's not possible.

I'll think some more about how to implement this. I think it's best to do it in the frontend, rather than complicating the adiff format. I'm also not sure what the best way to visually represent splits is. At a literal level, a way created by splitting is "new", and I don't think OSMCha should completely obfuscate that from the user. But adding info about the way that it was (likely) split from would indeed be helpful.

jake-low avatar Jun 16 '25 15:06 jake-low

Thanks for the link. I agree, the number and kind of edge cases are probably too complex to get anything going fast.

But having something on the frontend that has some user interaction, could be very possible. Since this has user interaction, it should allow users to understand that this is an imperfect comparison feature that can be configured in a way that does not make sense.

The nice think about this UI would be that should we have get a signal from somewhere like the "possible-split-id" prop from the thread, this will still work the same, just with a better default option.

Just for exploration:

  1. We could start with a button that makes it easy to trigger the compare. This would list all the ways (as a dropdown-button) that share notes with the current way
    Image
  2. We then have a UI similar to what we have now with a different reference. We could allow to change the reference via a dropdown-button in the "w/234" headline. I think this should(?) to also signal if the reference was modified during this changeset or not (gray line)
    Image

tordans avatar Jun 17 '25 05:06 tordans