Conversation
|
|
||
| /// Clips a way to the bounding box boundaries using Sutherland-Hodgman algorithm for polygons | ||
| /// or simple line clipping for polylines | ||
| fn clip_way_to_bbox( |
There was a problem hiding this comment.
Bug #1 is in here somewhere - we end up chopping things off incorrectly. I've removed this code as it seems like a lot of logic that shouldn't actually be doing much (generally our element processing clamps things to within bounds anyway, right?). But I also understand someone spent a lot of time writing this in the first place. I just don't personally want to be the one to figure out what is wrong in here (plus, there may be more bugs lurking here)
| } | ||
|
|
||
| // Process each outer polygon individually | ||
| for (i, outer_nodes) in outers.iter().enumerate() { |
There was a problem hiding this comment.
I pretty much fully reverted this. Bug #2 is that processing each polygon individually completely ruins the point of the merge_loopy_loops function
| } | ||
| } | ||
|
|
||
| if !nodes.is_empty() { |
There was a problem hiding this comment.
These various changes is so we don't accidentally exclude a node/way that's being used in our relation
|
|
||
| merge_loopy_loops(&mut inners); | ||
| if !verify_loopy_loops(&inners) { | ||
| // If inners are invalid, process outer without inners |
There was a problem hiding this comment.
This also didn't seem like a great fallback to me. If the inner loop is invalid we probably don't want to just fill it in!
Fixed docks as well in the latest commit. https://wiki.openstreetmap.org/wiki/Key:waterway Apparently "waterway=dock" represents a water area, so I've implemented that |
|
Incredible work as always. Tons of thanks to you! Minecraft then replaces the faulty chunks with the standard generated flat Minecraft "terrain". I fixed it locally to try out the waterway generation. Could you check back on your end if this regression is introduced by this PR? |
|
@louis-e Yeah that's a regression introduced by my other PR. I'll remove the commit from this so it's not blocking |
|
@louis-e done |
|
Perfect, thank you so much! |



With
argo run --release -- --bbox 45.943511,-66.675682,45.981934,-66.605644 --path server/world --ground-level 80 --terrain --fillground --interior --roof --debugI get this:my river is restored (:
this was the result of 2 separate bugs.