open¶
See also
Quickstart · STAC item queries guide · Temporal grouping guide · Cloud storage guide · Chunking guide · Inspecting read plans
lazycogs.open ¶
open(
href: str,
*,
datetime: str | None = None,
bbox: tuple[float, float, float, float],
crs: str | CRS,
resolution: float,
filter: str | dict[str, Any] | None = None,
ids: list[str] | None = None,
bands: list[str] | None = None,
chunks: dict[str, int] | None = None,
sortby: str | list[str | dict[str, str]] | None = None,
nodata: float | None = None,
dtype: str | dtype | None = None,
mosaic_method: type[MosaicMethodBase] | None = None,
time_period: str = "P1D",
store: ObjectStore | None = None,
max_concurrent_reads: int = 32,
path_from_href: Callable[[str], str] | None = None,
duckdb_client: DuckdbClient | None = None,
) -> DataArray
Open a mosaic of STAC items as a lazy (time, band, y, x) DataArray.
href must be a path to a geoparquet file (.parquet or
.geoparquet) or, when duckdb_client is provided, to a
hive-partitioned parquet directory.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
href
|
str
|
Path to a geoparquet file ( |
required |
datetime
|
str | None
|
RFC 3339 datetime or range (e.g. |
None
|
bbox
|
tuple[float, float, float, float]
|
|
required |
crs
|
str | CRS
|
Target output CRS. |
required |
resolution
|
float
|
Output pixel size in |
required |
filter
|
str | dict[str, Any] | None
|
CQL2 filter expression (text string or JSON dict) forwarded
to DuckDB queries, e.g. |
None
|
ids
|
list[str] | None
|
STAC item IDs to restrict the search to. |
None
|
bands
|
list[str] | None
|
Asset keys to include. If |
None
|
chunks
|
dict[str, int] | None
|
Chunk sizes passed to |
None
|
sortby
|
str | list[str | dict[str, str]] | None
|
Sort keys forwarded to DuckDB queries. |
None
|
nodata
|
float | None
|
No-data fill value for output arrays. |
None
|
dtype
|
str | dtype | None
|
Output array dtype. Defaults to |
None
|
mosaic_method
|
type[MosaicMethodBase] | None
|
Mosaic method class (not instance) to use. Defaults
to :class: |
None
|
time_period
|
str
|
ISO 8601 duration string controlling how items are
grouped into time steps. Supported forms: |
'P1D'
|
store
|
ObjectStore | None
|
Pre-configured obstore |
None
|
max_concurrent_reads
|
int
|
Maximum number of COG reads to run concurrently
per chunk. Items are processed in batches of this size, which
bounds peak in-flight memory when a chunk overlaps many files.
Methods that support early exit (e.g. the default
:class: |
32
|
path_from_href
|
Callable[[str], str] | None
|
Optional callable Example — NASA LPDAAC proxy https url for S3 asset:: |
None
|
duckdb_client
|
DuckdbClient | None
|
Optional |
None
|
Returns:
| Type | Description |
|---|---|
DataArray
|
Lazy |
Raises:
| Type | Description |
|---|---|
ValueError
|
If |