3 ms·
The source code is here, if you're interested: http://bost.ocks.org/mike/simplify/simplify.js http://bost.ocks.org/mike/simplify/simplify.js I'll probably pack
by mbostock 14y ago
The source code is here, if you're interested: http://bost.ocks.org/mike/simplify/simplify.js http://bost.ocks.org/mike/simplify/simplify.js
I'll probably package it up as a Node module so that it's easy to enable dynamic simplification of GeoJSON files. (A more efficient representation of shapes would also be helpful, though I like the convenience of plain text.) Or possibly a D3 plugin; it might be useful to extend the d3.geo.path shape generator to support more efficient dynamic filtering of points.
- hadley 14y agoHave you experimented with topologically consistent simplification? In my experience, that's the hard part - otherwise when simplifying (e.g.) state borders, the borders no longer match up.
- mbostock 14y agoNo, but that's next on my list! I'm familiar with at least one approach—identify borders shared by multiple features, simplify those independently, then stitch everything back together. I'm curious as to whether you can identify shared points and then use the average area of the associated triangles to prioritize removal.
- cpher 14y agoI would be impressed to see an implementation of this. Topology is absolutely critical for serious GIS applications. Of course, ESRI makes it looks easy within their software, but I haven't seen what a basic algorithm looks like for this task. Good luck!
- regularfry 14y agoIt seems a superficially similar problem to 3d mesh reduction.