d3 / d3-geo-projection

Extended geographic projections for d3-geo.
https://observablehq.com/collection/@d3/d3-geo-projection
Other
1.11k stars 201 forks source link

Invert Bertin1953, Chamberlin, interruptedSinuMollweide #181

Closed Fil closed 4 years ago

Fil commented 4 years ago

… with an approximate 2-d Newton-Raphson method.

The general Jacobian inversion method is detailed in Ipbuker & Bildirici 2002

In this implementation, I added a dampening factor when the determinant is too small — which helps with convergence near the singularities of the projection.

Inspired by Robert B. Schmunk’s work on the Bertin1953 inverse for G.Projector, which showed it was possible.

closes https://github.com/d3/d3-geo-projection/issues/85 (at long last)

Fil commented 4 years ago

I've written an explanation of the algorithm here https://observablehq.com/d/8fb764aa82e81880

Fil commented 4 years ago

Added a "backtrack if overshooting" step.