Skip to content

Commit

Permalink
Add alias for geopolygon (#169)
Browse files Browse the repository at this point in the history
  • Loading branch information
alexgleith authored Sep 30, 2024
1 parent e7aa2e4 commit 34e5539
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions odc/stac/_stac_load.py
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down Expand Up @@ -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:
Expand Down Expand Up @@ -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,
Expand Down

0 comments on commit 34e5539

Please sign in to comment.