From a1ae0db803e8bf851e315ac7b3f0bc30bd5c1fc4 Mon Sep 17 00:00:00 2001 From: Alex Date: Mon, 2 Sep 2024 14:31:15 +1000 Subject: [PATCH] Add alias for geopolygon --- odc/stac/_stac_load.py | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/odc/stac/_stac_load.py b/odc/stac/_stac_load.py index 32fbfab..2ecbda8 100644 --- a/odc/stac/_stac_load.py +++ b/odc/stac/_stac_load.py @@ -105,6 +105,7 @@ def load( y: Optional[Tuple[float, float]] = None, like: Optional[Any] = None, geopolygon: Optional[Any] = None, + intersects: Optional[Any] = None, # UI progress: Optional[Any] = None, fail_on_error: bool = True, @@ -263,6 +264,10 @@ def load( ``EPSG:4326`` projection for dictionary and Shapely inputs. CRS information available on GeoPandas inputs should be understood correctly. + :param intersects: + Simple alias to `geopolygon` so that the same inputs work for `pystac_client.Client.search` + as they do here. + .. rubric:: STAC Related Options :param stac_cfg: @@ -355,6 +360,9 @@ def load( items = list(items) _parsed = list(parse_items(items, cfg=stac_cfg, md_plugin=md_plugin)) + if geopolygon is None and intersects is not None: + geopolygon = intersects + gbox = output_geobox( _parsed, bands=bands,