-
Notifications
You must be signed in to change notification settings - Fork 160
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.geoNaturalEarth, please #69
Comments
well, to me this projection falls into the same bucket as plate carrée. I get that it's supposed to be better, but we still wouldn't use it in a nyt map, for instance. when I said cylindrical projections above, I actually meant pseudocylindrical. I think there should be at least one acceptable pseudocylindrical projection in D3 core. otherwise every user will have to go to d3-geo-projections and have to fiddle through the daunting task of creating their own custom d3 build, which isn't exactly fun at this point. any of these would be nice, I guess. but I prefer natural earth, both because it looks really good and the forward transformation is pretty fast, compared to some of the others in that list.
|
I tend to think that Robinson is more common that NaturalEarth, but the difference is very small (http://bl.ocks.org/Fil/641de759a2294387c7d414b2ac749243), and NaturalEarth has much less code. And all that time I thought the Times used the Times projection https://github.com/d3/d3-geo-projection#geoTimes 😂 |
Related d3/d3-geo-projection#84, we could implement Natural Earth II as d3.geoNaturalEarth2: The nice thing about that is there wouldn’t be a conflict or duplicating in moving d3.geoNaturalEarth from d3-geo-projection to d3-geo. Though to be fair, according to the research paper, “general map-readers rated the Natural Earth II projection lower than the Robinson and Natural Earth projections”. |
It is appealing. A bit sad, though, that the inverse isn't a formula (see d3/d3-geo-projection#85). In any case I think it is more important to offer what is "best" for users rather than what is more convenient for developers. |
The only ones in Gregor’s list that have closed-form inverses are Eckert IV and Wagner VI, but Eckert IV uses numerical integration for the forward projection… Anyway. I think all of them are viable as a default compromise world projection, but that probably the Natural Earth I is the “best”. While the implementations of all these candidates seem reasonable for inclusion in d3-geo (and by extension the default d3 bundle), there is still an important developer issue which is whether including the symbol So… some options:
Not an exhaustive list of options. |
I think implementing Natural Earth I as d3.geoNaturalEarth1 in d3-geo, and then re-exporting it as a deprecated alias d3.geoNaturalEarth from d3-geo-projection is probably the best option moving forward. That should avoid any build issues and work well with implementing Natural Earth II as d3.geoNaturalEarth2 in d3-geo-projection in the future. |
I really like this solution. Also looking forward to geoNaturalEarth2. The other solution I was thinking of was to just bundle geoNaturalEarth into the d3 build without including it in d3-geo. But geoNaturalEarth1 makes more sense. |
If implemented, how would this ultimately impact the ongoing use of Natural Earth's geometry vis converting from Esri Shapefile to TopoJSON? If I were using a workflow like that in topojson/world-atlas/prepublish, would this in any way change how I generate or use the resulting TopoJSON? I ask because I'm working on a blog post explaining how to use the current generation of tools and am wondering whether this will change that workflow at all. |
Natural Earth Data is wholly unrelated to the Natural Earth projection, so the proposed change here would little effect on world-atlas or similar pipelines for producing TopoJSON. It’s already the case that geoproject has access to all projections in d3-geo-projection, so you can say |
@mbostock Excellent; thank you! |
Fixed in #107. Will release shortly. |
It is now an alias for d3.geoNaturalEarth1 from d3-geo; see d3/d3-geo#69.
Fixed in 1.7.0. |
I'm not sure if this is the right way of doing this. It seems that in d3#69 the old function was not exported, breaking compatibility.
why? because the D3/4 core build has no sane map projection for making a simple world map.
and no, plate carrée and mercator don't count.
let's just add geoNaturalEarth, or really like any other decent looking pseudo-cylindrical map projection.
not all of them, just one, so people can make better world maps out of the box.
thanks!
The text was updated successfully, but these errors were encountered: