Closed mpaget closed 3 weeks ago
This is a limitation of Postgis. Postgis requires a numeric SRID which is more or less equivalent to an EPSG code, and does not understand WKT. The materialised view reprojects the extent from the native CRS to EPSG:4326 for the search index within the database, using Postgis SQL functions, so there's really no way around this with the current implementation. You could create a new SRID for the CRS in Postgis (which would involve translating from WKT to proj4text) but you would also need to set the CRS to "EPSG:
Note that this is not a new regression in 1.8.39 - this issue will affect all OWS versions since the materialised view approach was first adopted.
The new postgis index driver in datacube-core 1.9.x should facilitate a solution (as the projection from the native CRS to the search index CRS(s) is done in Python at indexing time), but OWS support for this new driver is still a few months off.
OK. Thank you, @SpacemanPaul. We'll look into some work-arounds.
Could we turn off materialised views for selected products? For our case the MODIS Land sinusoidal products are not in the ows-config; they're just having their materialised views created as part of the whole datacube, I assume.
That sounds doable. I'm planning to start work on some major cleanups of and updates to OWS shortly, so I should be able to get a workaround into the next release.
Fixed in both 1.8 and 1.9 branches.
Description
The CSIRO EASI database includes MODIS Land sinusoidal products with projection information stored as WKT. Running
datacube-ows-update
for v1.8.39 resulted in the following error. Perhaps the New Space Materialised View is expecting an EPSG integer somewhere but not also a WKT string?Context (Environment)
datacube-ows
version (datacube-ows --version):datacube-ows v1.8.39, https://ows.csiro.easi-eo.solutions/
ows_config.py
file (link, sample code)datacube product metadata (datacube product show product_name)
One of these MODIS Land products, I assume: https://explorer.csiro.easi-eo.solutions/products#modis-land-group