FosterHormannClipping accepts Spherical()/Geodesic(), but the edge intersection is planar regardless of manifold: _intersection_point(::Manifold, …) → _find_cross_intersection (in methods/clipping/intersection.jl) is a 2-D parametric solve on the raw (lon, lat) tuples, and clipping_processor.jl notes # spherical / geodesic will need s2 support at some point. So a clip edge crossing the antimeridian (or any wide arc) gets the wrong crossing latitude.
Prior art I found: #368 ([WIP] spherical polygon clipping, closed) is the same goal and notes it needs best_manifold(geom); the merged #376/#379 add spherical Sutherland-Hodgman but only for convex-convex inputs. The general (non-convex) intersection/FosterHormannClipping path is still planar — which is the case downstreams hit when clipping arbitrary (concave, holed) polygons like coastlines against a seam/lobe boundary.
Would be great to either route general spherical clipping through great-circle arc intersection (the primitive exists — UnitSpherical.spherical_arc_intersection) or document that Spherical() FosterHormannClipping is currently planar-approximate. Context: an in-review GeoMakie PR (MakieOrg/GeoMakie.jl#381) keeps a full d3-geo clipPolygon port to work around this — released GeoMakie does not have or need this. Related: #218, #17.
FosterHormannClipping accepts
Spherical()/Geodesic(), but the edge intersection is planar regardless of manifold:_intersection_point(::Manifold, …)→_find_cross_intersection(inmethods/clipping/intersection.jl) is a 2-D parametric solve on the raw(lon, lat)tuples, andclipping_processor.jlnotes# spherical / geodesic will need s2 support at some point. So a clip edge crossing the antimeridian (or any wide arc) gets the wrong crossing latitude.Prior art I found: #368 ([WIP] spherical polygon clipping, closed) is the same goal and notes it needs
best_manifold(geom); the merged #376/#379 add spherical Sutherland-Hodgman but only for convex-convex inputs. The general (non-convex)intersection/FosterHormannClippingpath is still planar — which is the case downstreams hit when clipping arbitrary (concave, holed) polygons like coastlines against a seam/lobe boundary.Would be great to either route general spherical clipping through great-circle arc intersection (the primitive exists —
UnitSpherical.spherical_arc_intersection) or document thatSpherical()FosterHormannClippingis currently planar-approximate. Context: an in-review GeoMakie PR (MakieOrg/GeoMakie.jl#381) keeps a full d3-geoclipPolygonport to work around this — released GeoMakie does not have or need this. Related: #218, #17.