facebook / Rapid

The OpenStreetMap editor driven by open data, AI, and supercharged features
https://rapideditor.org
ISC License
527 stars 92 forks source link

Baking an AI road introduces spurious line segments #1610

Open bos opened 2 weeks ago

bos commented 2 weeks ago

Description

Part 1: jaggies bad

The process of adding an AI road segment to the map often adds a big jagged line segment. I reported this a few weeks ago, but I think I failed to describe the problem accurately.

The issue looks like a simple bug of some sort: it literally connects a point near one end of the polyline to a point near the far end, thus introducing a big "jaggie" that has to be excised by hand.

Loss of editing capability

If the angle between the jaggie and the real polyline is acute enough (so that the geometry almost turns into two overlapping lines), the user loses the ability to click on any of the control points in the affected area. When this occurs, a whole lot of extra fiddling is required to fix up the broken geometry.

Jaggies used to not be a thing

This overall behavior is a regression that occurred some time in the past few months. These spurious jaggies used to never happen, whereas now they're fairly common: I'll encounter a number of them in any hour of use of the tool.

Part 2: regression in overlap with prior road

I also want to draw attention to the fact that in the example here, some of the AI geometry sits on top of an existing road segment, and will have to be excised by hand. This has recently been happening much more often than it used to.

In fact, sometimes Rapid will create geometry with the exact same control points as some roads that I added using Rapid months or years ago. Because Rapid is very bad at manipulating roads that share the same control points, any accidental use of an AI road that overlaps with a pre-existing road can be very difficult and time consuming to fix.

Screenshots

Pre-existing roads with AI turned off.

base

AI road segment. Note the overlap at the top with the pre-existing road segment.

before

After baking the AI segment onto the map. Note the spurious line segment that wasn't previously present.

after

Version

2.4.3

What browser are you seeing the problem on? What version are you running?

Safari v18.1

The OS you're using

mac

Steps to reproduce

I'm going to leave the offending example in place so that you can verify the problem by visiting the example URL.

The browser URL at the time you encountered the bug

https://rapideditor.org/edit#map=15.00/37.9713/-114.6464&background=Bing&datasets=fbRoads,msBuildings&disable_features=boundaries

The auto-detected useragent string for your browser (leave blank if you're manually filling this form out)

Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/18.1 Safari/605.1.15

Bonkles commented 2 weeks ago

We're currently investigating some potentially related issues with the conflation service and high error rates. The first thing I want to understand is why the roads and buildings are always conflating properly- I suspect that fixing that issue will also fix the 'spurious segment' issue.

I'm a bit more conversant in this space now that I fixed the roads, so I may be able to make some headway soon.

@bos, can you recall around when you first saw this behavior? Was it a while ago, before you filed #1579, or was that the first time you noticed?

Bonkles commented 2 weeks ago

I've a hunch that #1579 is coming into play here, but the problem is made worse when you combine it with the 'data isn't always conflated' bug that seems to be plaguing our conflation service more and more lately.

bhousel commented 2 weeks ago

Oh yeah, it's definitely #1579 and friends - I recognize the artifact where the head and tail of the road are connected by a long straight line. The server probably gave us pieces of that road drawn in different directions.

Also the "loss of editing control / If the angle between the jaggie and the real polyline is acute enough" part is #1429

bos commented 2 weeks ago

I'd been seeing the issue for several months, i.e. significantly earlier than I reported it, but I was silently coping for a while.

The conflation service (thanks for giving me its correct name) is indeed in bad shape. There are lots of roads in this map area where the AI and underlying roads fully overlap.