Closed DenisCarriere closed 6 years ago
The output you see is weird only because the viewer you use doesn't know how to display these big polygons, that are in the d3 flavor of GeoJSON.
Of course d3 views them perfectly http://blockbuilder.org/Fil/8226c572488d813a4de6dfd50ec5ca50
(Feel free to change d3.geoMercator
to some other projection or comment out line 153 to see the global thing).
Thank you!
OOOH I get it! 👍
Yea https://geojson.io might not do the trick for that type of GeoJSON output.
This sounds like it would be pretty tricky to support within TurfJS.
I don't know for turfjs, but in d3 we have antimeridian cutting, which you can get by applying an equirectangular transform, see https://github.com/d3/d3-geo/issues/113#issue-255965427
Interesting, I remember attempting this in the past and it's not an easy one, feel free to submit a PR if you find a solution for this.
Added simple GeoJSON input/output fixture.
Strange output... 🤔
It says here that
extent()
is not implemented, so maybe that's the reason why the strange output.