This was generated using the Natural Earth data set, which has nicer
simplification than my previous approach using MapShaper. Also, this includes
some updated boundaries, such as the split between Sudan and South Sudan. And,
counties now have ISO 3166-1 alpha-3 codes.
There is also a greatCircle as an alias, whose angle defaults to 90 degrees. (Or
should, but some projections cannot handle 90 degrees so we use 89 instead.)
The greatArc class is the new name for greatCircle, which actually represents
great arcs. Meanwhile, a new greatCircle class is for great circles. The new
greatCircle class replaces the old clip class, providing clipping and resampling
functionality (using greatArc internally). This isn't backwards-compatible, but
I may forgo the major version number bump in light of the fact that greatCircle
was just added, and not used in any (official) examples or documented.
We were registering multiple tick listeners, rather than replacing it. Oops!
In the future, we'll probably change the behavior of force.on to match
selection.on, and require a namespace for registering multiple listeners.
This test makes sure NaN doesn't creep in due to Math.acos being called
on numbers like +/- 1.000000000004, so it's more descriptive to check
isNaN rather than the exact numerical results.
We can interpolate the exact distance to the clipping edge, and use this
to interpolate the point exactly instead of computing a full path and
picking the closest point.
This can be used to process output from d3.geo.clip to ensure clipped
polygons are correctly curved.
The "n" option has been replaced with precision, which denotes the
approximate angular length of great-circle segments. This is much
faster than using a fixed number of segments, particularly when
processing a large number of polygons, only a few of which may have
edges long enough to warrant being converted into a geodesic.
This can be used with d3.geo.path.clip to clip the input coordinates of
geographical shapes using a given origin and angular radius, e.g. for
hemispherical or near-hemispherical views. Geodesics are inserted as
necessary.
This also includes a minor bugfix and test for d3.geo.path: the last
coordinate of Polygon features was being included unnecessarily
(MultiPolygon already handled this correctly).