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

Glitchy Geometry for road #833

Closed
Zaneo opened this issue Jan 6, 2022 · 4 comments
Closed

Glitchy Geometry for road #833

Zaneo opened this issue Jan 6, 2022 · 4 comments

Comments

@Zaneo
Copy link

Zaneo commented Jan 6, 2022

image

Way: https://www.openstreetmap.org/way/114559247

I do not expect any action on this, I just wanted to point out a case where there was something funny going on.

@dabreegster
Copy link
Collaborator

To repro easily, geojson is:

{
  "type": "FeatureCollection",
  "features": [
    {
      "type": "Feature",
      "properties": {},
      "geometry": {
        "type": "Polygon",
        "coordinates": [
          [
            [
              139.71793055534363,
              35.58628785038091
            ],
            [
              139.7271680831909,
              35.58628785038091
            ],
            [
              139.7271680831909,
              35.59249116981333
            ],
            [
              139.71793055534363,
              35.59249116981333
            ],
            [
              139.71793055534363,
              35.58628785038091
            ]
          ]
        ]
      }
    }
  ]
}

Look for lane 1763.

Something very funny is going on with OSM here... try clicking the intersections at either end and jumping to the OSM nodes. I get https://www.openstreetmap.org/node/1297431637#map=19/35.58856/139.72453 and https://www.openstreetmap.org/node/2071014569#map=19/35.58835/139.72473, but that second one isn't a member of the way

@dabreegster
Copy link
Collaborator

Actually wait, this is the classic problem with curved roads that have lots of points:
Screenshot from 2022-01-06 13-46-50

I manually removed some of the points with the RawMap editor and the problem cleared up. I literally made some changesets the other day to fix a similar problem elsewhere. @michaelkirk suggested using https://docs.rs/geo/latest/geo/algorithm/simplify/trait.Simplify.html to do this automatically, which would be way less of a hassle.

I'll try this out!

@dabreegster
Copy link
Collaborator

Screenshot from 2022-01-06 16-03-14
It's looking like an easy win! I'll regenerate all maps with this line simplification, then push through the change

dabreegster added a commit that referenced this issue Jan 6, 2022
… OSM too close together, it explodes PolyLine shifting. #833
@dabreegster
Copy link
Collaborator

Another example of a fix from the screenshot test in Kennington, London. Before:
Screenshot from 2022-01-06 17-24-01
After:
Screenshot from 2022-01-06 17-24-03
The fix will be merged momentarily, in next Sunday's build, or you can try it asap if you're building from source.

Thanks for raising this issue and urging a proper fix!

dabreegster added a commit that referenced this issue Jan 6, 2022
… OSM too close together, it explodes PolyLine shifting. #833
dabreegster added a commit that referenced this issue Feb 10, 2022
…r after collapsing degenerate intersections. This is a followup to #833.

And clean up some other things that RDP does better
dabreegster added a commit that referenced this issue Feb 10, 2022
…r after collapsing degenerate intersections. This is a followup to #833.

And clean up some other things that RDP does better.

Fallout from regenerating everything:

- Enfield borough crashed, so removed it
- All UK scenarios are now much bigger, due to the changes in #853 being
  picked up
- Poundbury gridlocks now due to that
dabreegster added a commit that referenced this issue Feb 10, 2022
…r after collapsing degenerate intersections. This is a followup to #833.

And clean up some other things that RDP does better.

Fallout from regenerating everything:

- Enfield borough crashed, so removed it
- All UK scenarios are now much bigger, due to the changes in #853 being
  picked up
- Poundbury gridlocks now due to that
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants