Open peterqliu opened 4 years ago
Hey Peter! It's probably not worth adding to the core unless it can be done minimally (to keep the library as simple as possible), and I'm not sure how to approach it (needs to be investigated), but have you seen https://github.com/mapbox/delatin? It's much better suited for cases like this, unless you need real time hierarchical simplification on the fly.
Great library @mourner. I've been adapting this to simplify non-square meshes, by buffering the east and southern edges with filler values. This forms a bigger square, whatever the next larger
2^n +1
integer may be (a 225x500 mesh becomes 513x513).To keep the algorithm from simplifying away vertices on the real edge, I fill the placeholder values with a constant, extremely low/high elevation, and then trim them away:
Two questions:
is this worth adding into core functionality? I'm curious if we can further optimize by skipping simplification on values that are known to be placeholders.
this strategy forms an interesting bandana pattern, where the eastern and southern edges keep a really fine detail (probably finer than necessary) where they were trimmed away. The savings might be minimal, but can we simplify those edges further?