Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add alias for geopolygon #169

Open
wants to merge 1 commit into
base: develop
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading