Dear community, i want to intersect polygons (in planar coordinates) with polygons (in geo coordinates).
Red hexagons are in planar coordinates (svg document). The Black polygon (world outline) is in geographical coordinates (lat, lon). What I want to do is intersect the red polygons (planar) with the black polygon (geo).
To solve that, I tried to unproject reds hexagons. It works in most cases. But at world scale, when dots are outside the sphere, I have some problems (as you can see)
And when I try to project each points defining the world outline, the result is surprising…
From a more general point of view, I need to convert geometries with planar coordinates (in the coordinates of the svg document) into geometries with lat,lon coordinates (from a geojson or topojson). And vice versa. This operation is easy for points with projection() and projection.invert(). Is there the same type of function ready to use for more complex geometries (polygons with holes, multipolygons, etc).
Well, I’m not sure to be clear. But any help is welcome