Antimeridian and the Datacube storage model #1572
Replies: 8 comments 3 replies
-
The ODC index assumes that every dataset extent can be projected to a 4386 lat/long bounding box - and then uses that for spatial search. There is no "right way" to index datasets like this into the postgres ODC index, they violates the implicit assumptions of the search implementation. The new postgis index driver in 1.9.0 should handle this case more gracefully, but stac-to-dc probably won't work with it yet. Feel free to try and tell us where it breaks. |
Beta Was this translation helpful? Give feedback.
-
Ok, looking in OWS, it seems it gets the BBOX wrong. See:
|
Beta Was this translation helpful? Give feedback.
-
That |
Beta Was this translation helpful? Give feedback.
-
Ah, and they're set from the Which are around the wrong way. |
Beta Was this translation helpful? Give feedback.
-
The geometry in the |
Beta Was this translation helpful? Give feedback.
-
Ok, and I can nail it down to these lines: https://github.com/opendatacube/datacube-ows/blob/8548e6841bda403aa350969803739e2d70306871/datacube_ows/sql/extent_views/create/011_create_new_space_view_raw.sql#L19-L27 |
Beta Was this translation helpful? Give feedback.
-
Ok, to close this off, I don't think there's an actual solution to this issue, so I'll try to write it up a bit here. Here's the situation:
I really think that the best way to handle geometry as lat/lon is to store the footprints as |
Beta Was this translation helpful? Give feedback.
-
And for future references, here's how Datacube OWS renders data at the antimeridian. |
Beta Was this translation helpful? Give feedback.
-
I've just indexed a single STAC Item (this one https://deppcpublicstorage.blob.core.windows.net/output/dep_s2_geomad/0-0-4/066/021/2023/dep_s2_geomad_066_021_2023.stac-item.json) and it crosses the antimeridian, with lat/lon geometry split at the
+/- 180
line.I indexed it with one of the
stac-to-dc
tools.In database, I see the longitude coordinates are:
Which is correct, but sort of not ideal, as it goes past
180
.What is the right way to be storing this extent in the Datacube database?
Beta Was this translation helpful? Give feedback.
All reactions