Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Changes to materialised view definition to prevent errors on databases with WKT CRSs #1037

Merged
merged 2 commits into from
Jul 22, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,18 @@ Features
* Supports WCS versions 1.0.0, 2.0.0 and 2.1.0.
* Richly featured styling engine for serving data visualisations via WMS and WMTS.

Known CRS Limitations
---------------------

1. ODC datasets with WKT-format CRSs will not work with OWS - data from such datasets
will never be displayed. OWS currently only works with EPSG format CRSs.

2. Datasets that straddle the anti-meridian or the north or south polar region will
cause issues with the legacy postgres driver.

These are fundamental limitation of the way OWS works with the postgres ODC index driver.
These limitations will be addressed in v1.9.0, but only for the new ODC postgis index driver.

Community
---------

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ eo3_ranges as
from agdc.dataset where
metadata_type_ref in (select id from metadata_lookup where name='eo3')
and archived is null
and upper(substr(metadata #>> '{crs}', 1, 5)) = 'EPSG:'
),
-- This is eo spatial (Uses ALOS-PALSAR over Africa as a sample product)
eo_corners as
Expand All @@ -45,7 +46,7 @@ eo_corners as
and archived is null
and (metadata #>> '{grid_spatial, projection, valid_data}' is null
or
substr(metadata #>> '{grid_spatial, projection, spatial_reference}', 1, 4) <> 'EPSG'
upper(substr(metadata #>> '{grid_spatial, projection, spatial_reference}', 1, 5)) <> 'EPSG:'
)
),
eo_geoms as
Expand All @@ -62,8 +63,8 @@ eo_geoms as
from agdc.dataset where
metadata_type_ref in (select id from metadata_lookup where name in ('eo','eo_s2_nrt','gqa_eo','eo_plus', 'boku'))
and archived is null
and metadata #>> '{grid_spatial, projection, valid_data}' is not null
and substr(metadata #>> '{grid_spatial, projection, spatial_reference}', 1, 5) = 'EPSG:'
and metadata #>> '{grid_spatial, projection, valid_data}' is not null
and upper(substr(metadata #>> '{grid_spatial, projection, spatial_reference}', 1, 5)) = 'EPSG:'
)
select id,format('POLYGON(( %s %s, %s %s, %s %s, %s %s, %s %s))',
lon_begin, lat_begin, lon_end, lat_begin, lon_end, lat_end,
Expand Down Expand Up @@ -97,4 +98,5 @@ select id,
) as spatial_extent
from agdc.dataset where
metadata_type_ref in (select id from metadata_lookup where name like 'eo3_%')
and upper(substr(metadata #>> '{grid_spatial, projection, spatial_reference}', 1, 5)) = 'EPSG:'
and archived is null
Loading