Skip to content

intersection(Spherical(), …) clips with planar edge intersection, not great-circle #417

Description

@briochemc

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions