From bc9415632efb3e69d8b994d8c502292035fa24ba Mon Sep 17 00:00:00 2001 From: Paul Haesler Date: Thu, 29 Feb 2024 15:36:50 +1100 Subject: [PATCH] Make feature info output GeoJSON compatible. (#995) * Make feature info output GeoJSON compatible. * Correct error message as per #985 * Update product document for geomedian test data. * Update product document for geomedian test data. * Get GeoJSON output working for data and nodata case. --- check-code-all.sh | 2 +- datacube_ows/data.py | 6 +++++- datacube_ows/ows_configuration.py | 2 +- 3 files changed, 7 insertions(+), 3 deletions(-) diff --git a/check-code-all.sh b/check-code-all.sh index 721b26dc..8ac70aa0 100755 --- a/check-code-all.sh +++ b/check-code-all.sh @@ -21,7 +21,7 @@ datacube product add https://raw.githubusercontent.com/GeoscienceAustralia/dea-c # Geomedian for summary product testing -datacube product add https://raw.githubusercontent.com/GeoscienceAustralia/dea-config/master/products/baseline_satellite_data/geomedian-au/ga_ls8c_nbart_gm_cyear_3.odc-product.yaml +datacube product add https://explorer-aws.dea.ga.gov.au/products/ga_ls8c_nbart_gm_cyear_3.odc-product.yaml # S2 multiproduct datasets datacube dataset add https://dea-public-data.s3.ap-southeast-2.amazonaws.com/baseline/ga_s2bm_ard_3/52/LGM/2017/07/19/20170719T030622/ga_s2bm_ard_3-2-1_52LGM_2017-07-19_final.odc-metadata.yaml --ignore-lineage diff --git a/datacube_ows/data.py b/datacube_ows/data.py index 0e859a61..5f53b775 100644 --- a/datacube_ows/data.py +++ b/datacube_ows/data.py @@ -895,7 +895,11 @@ def feature_info(args): "features": [ { "type": "Feature", - "properties": feature_json + "properties": feature_json, + "geometry": { + "type": "Point", + "coordinates": geo_point.coords[0] + } } ] } diff --git a/datacube_ows/ows_configuration.py b/datacube_ows/ows_configuration.py index 06d8988c..cffedcfe 100644 --- a/datacube_ows/ows_configuration.py +++ b/datacube_ows/ows_configuration.py @@ -770,7 +770,7 @@ def ready_wcs(self, dc): native_bounding_box = self.bboxes[self.native_CRS] except KeyError: if not self.global_cfg.called_from_update_ranges: - _LOG.warning("Layer: %s No bounding box in ranges for native CRS %s - rerun update_ranges.py", + _LOG.warning("Layer: %s No bounding box in ranges for native CRS %s - rerun datacube-ows-update", self.name, self.native_CRS) self.hide = True