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

Crash setting invalid neighbourhood boundary polgons #54

Closed
dabreegster opened this issue May 5, 2024 · 5 comments · Fixed by #80
Closed

Crash setting invalid neighbourhood boundary polgons #54

dabreegster opened this issue May 5, 2024 · 5 comments · Fixed by #80
Labels
good first issue Good for newcomers

Comments

@dabreegster
Copy link
Collaborator

{"type":"FeatureCollection","features":[{"type":"Feature","geometry":{"type":"Polygon","coordinates":[[[-83.002943,39.967515],[-83.003346,39.967474],[-83.00346,39.967463],[-83.003428,39.967265],[-83.003416,39.967186],[-83.003289,39.966563],[-83.003215,39.966193],[-83.003193,39.966083],[-83.003071,39.966097],[-83.002628,39.966147],[-83.00241,39.966173],[-83.00233,39.966183],[-83.001582,39.966266],[-83.001429,39.966283],[-83.001277,39.9663],[-83.000526,39.966386],[-83.00045,39.966395],[-83.000235,39.966419],[-83.000109,39.966434],[-82.999968,39.96645],[-82.99953,39.966499],[-82.999198,39.966537],[-82.999013,39.966558],[-82.99889,39.966573],[-82.998762,39.966587],[-82.998634,39.966602],[-82.998248,39.966647],[-82.997899,39.966688],[-82.997195,39.966771],[-82.997161,39.966775],[-82.997033,39.96679],[-82.996965,39.966792],[-82.996897,39.966788],[-82.996754,39.966772],[-82.996607,39.966738],[-82.996494,39.966718],[-82.996404,39.96671],[-82.996302,39.966711],[-82.996187,39.966721],[-82.995634,39.966781],[-82.994292,39.966934],[-82.993705,39.967],[-82.993524,39.96702],[-82.993062,39.967072],[-82.993033,39.966923],[-82.993012,39.966812],[-82.992998,39.966735],[-82.992984,39.966662],[-82.992964,39.966561],[-82.992946,39.966463],[-82.992944,39.966455],[-82.992881,39.966125],[-82.992859,39.966008],[-82.992838,39.965898],[-82.993568,39.965813],[-82.993699,39.965798],[-82.99382,39.965784],[-82.993727,39.965308],[-82.993722,39.965281],[-82.993642,39.964872],[-82.993716,39.964863],[-82.994194,39.964806],[-82.99474,39.964741],[-82.994676,39.964413],[-82.994661,39.964333],[-82.994751,39.964321],[-82.994821,39.964277],[-82.994974,39.96426],[-82.995174,39.964237],[-82.995536,39.964196],[-82.995642,39.964184],[-82.995632,39.96413],[-82.99552,39.963544],[-82.996391,39.963445],[-82.996509,39.963432],[-82.997255,39.963348],[-82.99801,39.963262],[-82.998119,39.96325],[-82.998238,39.963236],[-82.998812,39.963171],[-82.999885,39.96305],[-82.999772,39.962461],[-82.999747,39.962332],[-83.000512,39.962246],[-83.000642,39.962232],[-83.000668,39.962366],[-83.000891,39.963501],[-83.000912,39.963617],[-83.000934,39.963731],[-83.00115,39.964843],[-83.001169,39.96494],[-83.001319,39.964923],[-83.002069,39.964838],[-83.00214,39.96483],[-83.002814,39.964754],[-83.002931,39.964741],[-83.002954,39.964855],[-83.003065,39.965416],[-83.003173,39.965984],[-83.003193,39.966083],[-83.003215,39.966193],[-83.003289,39.966563],[-83.003415,39.966687],[-83.003459,39.966715],[-83.003519,39.966754],[-83.003576,39.966776],[-83.00364,39.966793],[-83.003831,39.966805],[-83.003679,39.96687],[-83.003588,39.966928],[-83.00353,39.966986],[-83.003521,39.966995],[-83.003452,39.96709],[-83.003416,39.967186],[-83.003428,39.967265],[-83.00346,39.967463],[-83.003346,39.967474],[-83.002943,39.967515]]]},"properties":{"kind":"boundary","name":"x","waypoints":[{"lat":39.967515,"lon":-83.002943,"snapped":true},{"lat":39.966561,"lon":-82.992964,"snapped":true},{"lat":39.962232,"lon":-83.000642,"snapped":true},{"lat":39.967515,"lon":-83.002943,"snapped":true}]}},{"type":"Feature","geometry":{"type":"Polygon","coordinates":[[[-83.0053405,39.9678779],[-83.0045862,39.96869],[-82.9941706,39.9737158],[-82.984929,39.9668181],[-82.9910597,39.9633206],[-82.9999824,39.9588082],[-83.0017514,39.9586074],[-83.0028556,39.958912],[-83.0040135,39.9618312],[-83.004195,39.962291],[-83.004311,39.962637],[-83.0054231,39.9665874],[-83.0053405,39.9678779]]]},"properties":{"kind":"study_area_boundary"}}],"study_area_name":null}

dabreegster added a commit that referenced this issue Nov 9, 2024
I was hoping this would solve #54, but the new iOverlay code isn't used
for polygon-contains-linestring.

WIP: Tests fail with this, need to investigate later.
dabreegster added a commit that referenced this issue Nov 17, 2024
I was hoping this would solve #54, but the new iOverlay code isn't used
for polygon-contains-linestring.

The cells in the test output change, but visually and behaviorally
they're identical.
@michaelkirk
Copy link
Contributor

If you can tell me how to reproduce this crash, I can take a look.

@dabreegster
Copy link
Collaborator Author

Gladly, thank you!

  1. Run locally, https://github.com/a-b-street/ltn?tab=readme-ov-file#installation
  2. Save the GJ above to a file
  3. Load project from that file
  4. Zoom in and click the red neighbourhood

Crash in console log

@michaelkirk
Copy link
Contributor

Ah, this is georust/geo#1268 right?

@dabreegster
Copy link
Collaborator Author

Ah yes, I forgot I already reported this upstream!

@dabreegster
Copy link
Collaborator Author

Now that there's a way to check boundary validity, we could use it before letting the user save a boundary. We could give them a hint how to clean up the "spur / dangle" that's usually the problem, or try to autocorrect to just the big polygon piece?

@dabreegster dabreegster added the good first issue Good for newcomers label Jan 12, 2025
@dabreegster dabreegster changed the title Another georust crash Crash setting invalid neighbourhood boundary polgons Jan 12, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Good for newcomers
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants