Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add GeoJSON test fixture #5

Merged
merged 1 commit into from
Oct 29, 2017
Merged

Add GeoJSON test fixture #5

merged 1 commit into from
Oct 29, 2017

Conversation

DenisCarriere
Copy link
Contributor

Added simple GeoJSON input/output fixture.

Strange output... 🤔

image

image

It says here that extent() is not implemented, so maybe that's the reason why the strange output.

voronoi.extent([extent]) and voronoi.size([size]) are not implemented.

@Fil
Copy link
Owner

Fil commented Oct 29, 2017

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).

capture d ecran 2017-10-29 a 21 21 13

capture d ecran 2017-10-29 a 21 20 20

@Fil Fil merged commit a578f1c into Fil:master Oct 29, 2017
@Fil
Copy link
Owner

Fil commented Oct 29, 2017

Thank you!

@DenisCarriere
Copy link
Contributor Author

DenisCarriere commented Oct 30, 2017

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.

@DenisCarriere DenisCarriere deleted the tests branch October 30, 2017 00:59
@Fil
Copy link
Owner

Fil commented Oct 30, 2017

I don't know for turfjs, but in d3 we have antimeridian cutting, which you can get by applying an equirectangular transform, see d3/d3-geo#113 (comment)

@DenisCarriere
Copy link
Contributor Author

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants