Skip to content

Commit 34e5539

Browse files
authored
Add alias for geopolygon (#169)
1 parent e7aa2e4 commit 34e5539

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

odc/stac/_stac_load.py

+8
Original file line numberDiff line numberDiff line change
@@ -105,6 +105,7 @@ def load(
105105
y: Optional[Tuple[float, float]] = None,
106106
like: Optional[Any] = None,
107107
geopolygon: Optional[Any] = None,
108+
intersects: Optional[Any] = None,
108109
# UI
109110
progress: Optional[Any] = None,
110111
fail_on_error: bool = True,
@@ -263,6 +264,10 @@ def load(
263264
``EPSG:4326`` projection for dictionary and Shapely inputs. CRS information available
264265
on GeoPandas inputs should be understood correctly.
265266
267+
:param intersects:
268+
Simple alias to `geopolygon` so that the same inputs work for `pystac_client.Client.search`
269+
as they do here.
270+
266271
.. rubric:: STAC Related Options
267272
268273
:param stac_cfg:
@@ -355,6 +360,9 @@ def load(
355360
items = list(items)
356361
_parsed = list(parse_items(items, cfg=stac_cfg, md_plugin=md_plugin))
357362

363+
if geopolygon is None and intersects is not None:
364+
geopolygon = intersects
365+
358366
gbox = output_geobox(
359367
_parsed,
360368
bands=bands,

0 commit comments

Comments
 (0)