Skip to content

Revisit plan_read mortie linestring vs shapely after mortie v1 (#57) #60

Description

@espg

Summary

Tracking follow-up from #53 (closed with Option A: keep shapely LineString in plan_read unconditionally for now).

When mortie v1 ships (#57), revisit whether plan_read's within-granule segment->AOI crossing check should branch on grid type and call into mortie's linestring coverage for HEALPix grids — for end-to-end S2 consistency with mortie-driven shard dispatch.

Why deferred (per #53 analysis)

  • Euclidean error is negligible at ATL03 photon spacing. ~10 m per 100 km of segment, well inside any usable HEALPix cell — the within-granule check is a crossing filter, not a precision geometry op.
  • Avoid premature binding to a moving API. mortie is mid-redesign for v1 (morton_index datatype per Major Feature / Enhancement — Full resolution Morton MOC datatype espg/mortie#35, etc.); the linestring coverage interface may shift. Binding plan_read now risks rewriting it once v1 lands.

When to revisit

After #57 (mortie v1 integration) resolves and the v1 linestring API surface is stable. At that point evaluate:

  1. mortie v1 linestring coverage signature — what does the call look like; does it match plan_read's segment-rep-point input shape ((lat, lon) pairs)?
  2. Grid-type branch in plan_read — is the right seam at plan_read(...) (passing a grid handle), or in _planned_read_group (computing the crossing mask before calling plan_read)?
  3. Measurable benefit on a real region — does the S2 path actually change which segments match the AOI for a 10 km × 10 km HEALPix shard, vs the current Euclidean path? If parity is byte-identical at ATL03 cell scales, the consistency argument alone may not justify the dependency.

Refs

Metadata

Metadata

Assignees

No one assigned

    Labels

    blockedflag for claudeenhancementNew feature or request

    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