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 d3.geo.project(object, projection). #1

Merged
merged 6 commits into from
Jul 4, 2013
Merged

Add d3.geo.project(object, projection). #1

merged 6 commits into from
Jul 4, 2013

Conversation

mbostock
Copy link
Member

Given a GeoJSON object (such as a FeatureCollection), returns a new object of the same type with the coordinates projected using the specified projection. The projection is applied by using a buffering output context, and thus incorporates adaptive resampling and clipping, if any.

Given a GeoJSON object (such as a FeatureCollection), returns a new object of
the same type with the coordinates projected using the specified projection. The
projection is applied by using a buffering output context, and thus incorporates
adaptive resampling and clipping, if any.
@jasondavies
Copy link
Contributor

Nice! I fixed a problem with polygon rings.

jasondavies and others added 3 commits June 24, 2013 10:36
D3 doesn't emit a closing point for polygon rings, so this needs to be
reinserted since it is required by GeoJSON.

If there are fewer than 3 points emitted, then we reinsert the first
point more than once, which TopoJSON also does.  Alternatively, we might
consider generating a line or a point in this situation.
Also, remove the dependency on all for the test target.
@mbostock
Copy link
Member Author

Thanks for the test!

@mbostock mbostock merged commit 1a4f8ed into master Jul 4, 2013
@mbostock mbostock deleted the project branch July 4, 2013 03:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
2 participants