Skip to content

STAC: antimeridian bbox not split, causing wrong/missing results for global collections #1568

@JeroenVerstraelen

Description

@JeroenVerstraelen

Summary

When loading data from a STAC collection for a spatial extent that crosses the antimeridian, the STAC backend sends a single large bbox request instead of splitting it into two separate requests. This results in vastly incorrect item counts and causes holes or strong differences in output compared to the OpenSearch implementation.

Reproduction

Observed via the LCFM_LSF_ANNUAL_S1_01WCT benchmark (global S1 mosaics collection), tile 01WCT which was specifically chosen because it crosses the antimeridian.

Behavior

STAC implementation sends a single bbox crossing the antimeridian and gets 4913 STAC items (incorrect):

"bbox": [-179.3969135181096, 69.24723897024575, 177.93749065586138, 70.29008782695199]

OpenSearch implementation splits into two requests and gets 48 results (correct):

{ "west": 177.93749065586144, "south": 69.24723897024575, "east": 180.6030864818904, "north": 70.290087826952 }
{ "west": -182.06250934413856, "south": 69.24723897024575, "east": -179.3969135181096, "north": 70.290087826952 }

Impact

All global productions and projects using STAC collections will be affected when spatial extents cross the antimeridian.

Proposed Fix

Reuse the antimeridian-splitting logic already implemented for OpenSearch: detect when a bbox crosses the antimeridian and issue two separate STAC requests, then merge the results.

The STAC API community also recommends the antimeridian Python package for correcting GeoJSON geometries that cross the 180th meridian.

A unit test covering the antimeridian case should be added as well.

Priority

Not a release blocker for the current deploy, but should be treated as high priority to fix immediately after, as it affects all global productions.

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions