Skip to content

Commit

Permalink
Fix tests - auto-publish 3832 if 3857 is published.
Browse files Browse the repository at this point in the history
  • Loading branch information
SpacemanPaul committed Nov 8, 2024
1 parent ddd420e commit 5fb1900
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 0 deletions.
13 changes: 13 additions & 0 deletions datacube_ows/ows_configuration.py
Original file line number Diff line number Diff line change
Expand Up @@ -1433,6 +1433,19 @@ def make_gml_name(name):
else:
self.default_geographic_CRS = geographic_CRSs[0]

if "EPSG:3857" not in self.published_CRSs:
_LOG.warning("EPSG:3857 (Web mercator) is not a published CRS")
elif "EPSG:3832" not in self.published_CRSs:
# Have web merc but not Pacific Web merc - just add it silently.
self.published_CRSs["EPSG:3832"] = {
"geographic": False,
"horizontal_coord": "x",
"vertical_coord": "y",
"vertical_coord_first": False,
"gml_name": make_gml_name("EPSG:3832"),
"alias_of": None
}

for alias, alias_def in CRS_aliases.items():
target_crs = cast(str, alias_def["alias"])
if target_crs not in self.published_CRSs:
Expand Down
1 change: 1 addition & 0 deletions integration_tests/test_mv_index.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ def __init__(self, geom):
if geom.crs != "EPSG:4326":
geom = geom.to_crs("EPSG:4326")
self.geographic_extent = geom
self.extent = geom


def test_time_search():
Expand Down

0 comments on commit 5fb1900

Please sign in to comment.