opendatacube / datacube-explorer

Web-based exploration of Open Data Cube collections
Apache License 2.0
54 stars 31 forks source link

Improve tests and behaviour in Summaries for anti-meridian crossing datasets #538

Open whatnick opened 8 months ago

whatnick commented 8 months ago

Current test for anti-meridian crossing dataset summaries uses only a single polygon. This does not really exercise the database side ST_UNION function. In practice a small number of datasets can be crafted where the union results in degenerate summary polygons. See the illustrations below.

Datasets:

image

Product Summary:

image

Relevant source:

https://github.com/opendatacube/datacube-explorer/blob/ccf1f3a1dfed5bc77d3bf083321e1d7d478a071d/cubedash/summary/_summarise.py#L72

Relevant test:

https://github.com/opendatacube/datacube-explorer/blob/ccf1f3a1dfed5bc77d3bf083321e1d7d478a071d/integration_tests/test_model.py#L170