From 220b62f0db795f9bbc2ed391da3281c5bf15fa2c Mon Sep 17 00:00:00 2001 From: Paul Haesler Date: Fri, 8 Nov 2024 13:02:53 +1100 Subject: [PATCH] Layer reprs. --- datacube_ows/ows_configuration.py | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/datacube_ows/ows_configuration.py b/datacube_ows/ows_configuration.py index d6c6a8d3c..b282a9d5d 100644 --- a/datacube_ows/ows_configuration.py +++ b/datacube_ows/ows_configuration.py @@ -396,6 +396,9 @@ def make_ready(self, *args, **kwargs) -> None: self.unready_layers = still_unready super().make_ready(*args, **kwargs) + def __repr__(self) -> str: + return f"OWS Folder <{self.title}>" + class TimeRes(Enum): SUBDAY = "subday" @@ -1041,6 +1044,9 @@ def lookup_impl(cls, cfg: "OWSConfig", keyvals: dict[str, str], subs: CFG_DICT | except KeyError: raise OWSEntryNotFound(f"Layer {keyvals['layer']} not found") + def __repr__(self) -> str: + return f"OWS Layer <{self.name}>" + class OWSProductLayer(OWSNamedLayer): multi_product = False @@ -1425,7 +1431,14 @@ def make_gml_name(name): "but has a vertical coordinate that is not 'latitude'") # default_geographic_CRS is used by WCS1 if not self.wcs: - self.default_geographic_CRS = "" + self.default_geographic_CRS["EPSG:3832"] = { + "geographic": False, + "horizontal_coord": "x", + "vertical_coord": "y", + "vertical_coord_first": False, + "gml_name": make_gml_name("EPSG:3832"), + "alias_of": None + } elif not geographic_CRSs: raise ConfigException(f"At least one geographic CRS must be supplied") elif "EPSG:4326" in geographic_CRSs or "WGS-84" in geographic_CRSs: