figma-plugin
figma-plugin copied to clipboard
Render oceans
Right now one of the most annoying things about this plugin is that it doesn't render water areas properly. I'm not 100% sure how to do this - need to do some spelunking in iD. The solution probably isn't something like downloading the entire relation, because relations are gigantic. But maybe it's winding order or something like that?
Still not sure how to do this, tbh. This is a "deep hard problem", some refs:
- https://help.openstreetmap.org/questions/50891/problem-with-rendering-water-from-overpass-data (it's hard, recommending a separate dataset)
- https://www.reddit.com/r/openstreetmap/comments/jxfo1f/comment/gcxexe0/?utm_source=reddit&utm_medium=web2x&context=3
Possible solutions:
- https://osmdata.openstreetmap.de/data/water-polygons.html
I think the solution is going to be the osmdata polygons, and then ignore all coastlines in the osm data, request polys by tile number, clip the polys, voila. Uploaded them to both R2 and S3, for some reason, next steps:
- [ ] Set up worker to request from R2
- [ ] Add FlatGeobuf to backend code
- [ ] Calculate tile numbers on backend
- [ ] Request & draw
And, maybe, as might be necessary, clip at some stage here to make sure the polygons are not gigantic.