riatelab / bertin

A package to draw maps in javascript
https://observablehq.com/collection/@neocartocnrs/bertin
MIT License
307 stars 15 forks source link

projection #61

Closed neocarto closed 2 years ago

neocarto commented 2 years ago

PROJ4 & EPSG projections do not work well when making a map containing an "outline" layer

Fil commented 2 years ago

From what I understand (in https://observablehq.com/@fil/proj4js-d3):

For EPSG:3031, which is centered on the South Pole, things are a bit more complicated, as a direct application breaks a few things (the Sphere, which should be in pale yellow, is not drawn). The reason for this is that, in d3, clipAngle is calculated from the projection’s rotate (in this case, [0,0]), but here we would like it to be calculated from the projection’s center (the South Pole).