Closed anandthakker closed 8 years ago
Yeah, I basically discovered that around the same time and am working on that in this more projections branch.
One issue I ran into early on is that all the projections come of the box with a flipped Y axis. I'm betting this is to make it plug-and-play with the D3/SVG workflow, which flips the Y axis as well. I made forks of d3-geo
and d3-geo-projection
to correct this, and it's working for everything except the all-important Albers US projection, which shows Hawai'i and Alaska right, but the continental 48 upside-down. This was as far as I got last weekend.
@anandthakker if you have a cycle and want to take a look at the current state of things, that branch is the place to start. My fork of d3-geo
, where the projection calculation is happening, is here. I almost didn't have to fork d3-geo-projection
, except it includes d3-geo
as a dep.
A cleaner option could be to leave d3-geo
alone and flip the projected data ourselves, or go back to using the script you already wrote. The d3-geo-projection
CL tool is a bit cleaner on some of the weirder projections though.
Ah, cool. I'll check out that branch -- maybe there's a nice in-between solution; I think it would be beneficial to avoid forking the d3-* stuff if possible.
On Mon, Nov 21, 2016 at 7:31 PM Derek Lieu notifications@github.com wrote:
A cleaner option could be to leave d3-geo alone and flip the projected data ourselves, or go back to using the script you already wrote. The d3-geo-projection CL tool is a bit cleaner on some of the weirder projections though.
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/developmentseed/dirty-reprojectors/issues/5#issuecomment-262111710, or mute the thread https://github.com/notifications/unsubscribe-auth/AEvmR-0dMhOToHLNSEzzr6arOq69nuduks5rAjfZgaJpZM4Kxk_j .
See #6
I noticed in a tweet by mbostock this weekend that
d3-geo-projection
actually ships with command line tools which might obviate some of the work that's happening inreproject-geojson
. I think it would make sense to refactor to use that, and keep this repository very specifically focused on the trickery required to get this to work with Mapbox Studio / GL