Сonvert geographic points considering antimeridian and pole
dowhileforeach opened this issue · comments
Do|While|For|Each commented
You provided a great opportunity to render geographic data given the antimeridian and pole using a geoPath
:
const projection = geoMercator()
.rotate([70, 0, 0])
.fitWidth(side, {type: 'Sphere'})
;
const path = geoPath(projection, context);
context.beginPath();
path(land);
// <--- pass GeoJSON
context.fillStyle = 'black';
context.fill();
Can you please tell me if it is possible to do the following:
- I have geographic data (GeoJSON, just an array of geographic points, etc.)
- I pass this data to some d3 function
- and as a result I get the same geographical data, only taking into account the antimeridian and the pole for the corresponding projection.
The fact is that before drawing on the canvas, I still need to transform the point from the projection in a tricky way. And for me the problem is that geoPath
immediately draws on the canvas and I can’t give it the transformation I need from projection -> to view (in the form of a matrix [a, b, c, d, e, f]).