You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/pystac-into-xarray.md
+2-16Lines changed: 2 additions & 16 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,6 +1,6 @@
1
1
# Additional Libraries
2
2
3
-
The following examples focus on loading COG data into xarray object backed by Dask for efficient inmemory reading and processing.
3
+
The following examples focus on loading COG data into xarray object backed by Dask for efficient in-memory reading and processing.
4
4
5
5
!!! info
6
6
[Xarray] is build on NumPy and Pandas, adding capabilities for labeled and multi-dimensional arrays (e.g., climate data, satellite images). It extends NumPy arrays by attaching metadata (coordinates, labels), making it easier to work with data dimensions like time, latitude, longitude, and other variables.
@@ -16,10 +16,6 @@ The following examples focus on loading COG data into xarray object backed by Da
16
16
17
17
## Using Rioxarray
18
18
19
-
Load a single COG, using the link to the s3 object, into an xarray.
20
-
21
-
Rioxarray is based on rasterio, and can be used to read data into Xarray object. The developers of the rioxarray library provide additional usage examples, like this [one](https://corteva.github.io/rioxarray/stable/examples/read-locks.html).
show_root_toc_entry: false # To remove the name of the file in the TOC
33
29
34
-
!!! Note
35
-
When using `rioxarray.open_rasterio()` set `chunks` to enable lazy loading with Dask. This allows Dask to read data in smaller chunks, improving speed and memory usage through parallel computing. For example, a `chunk` size of 1000 for both x and y means Dask reads 100x100 boxes instead of the entire array, processing multiple chunks simultaneously.
36
-
37
30
```py linenums="1" hl_lines="20-23"
38
31
--8<--"how-to-guides/rioxarray-example.py:code"
39
32
```
@@ -57,12 +50,9 @@ See [pystac.Item] or [pystac-client] for more information.
57
50
58
51
### Using [stackstac]
59
52
60
-
This is a third party library based on Xarray, but not listed under the Xarray documentation.
61
-
62
53
```sh
63
54
--8<-- "how-to-guides/stackstac-requirements.txt"
64
55
```
65
-
If you have problems with the installation, please refer to [stackstac installation].
66
56
67
57
<!-- START: Read with stackstac-stac -->
68
58
::: how-to-guides.stackstac-example
@@ -76,14 +66,12 @@ If you have problems with the installation, please refer to [stackstac installat
76
66
```
77
67
78
68
See [working-with-xarray-object] or [community-notebook-complete-examples] section for an example on using Xarray object.
79
-
### Using [odc-stac]
80
69
81
-
This is a third party library based on Xarray, but not listed under the Xarray documentation.
70
+
### Using [odc-stac]
82
71
83
72
```sh
84
73
--8<-- "how-to-guides/odc-stac-requirements.txt"
85
74
```
86
-
If you have problems with the installation, please refer to [odc-stac installation].
87
75
88
76
<!-- START: Read with odc-stac -->
89
77
::: how-to-guides.odc-stac-example
@@ -112,8 +100,6 @@ See `Xarray.DataArray` for details on methods : <https://docs.xarray.dev/en/stab
112
100
[Xarray: Parallel Computing with Dask]: https://docs.xarray.dev/en/stable/user-guide/dask.html
113
101
[STAC documentation on proj:transform]: https://github.com/stac-extensions/projection?tab=readme-ov-file#projtransform
114
102
[Re-order the STAC proj:Transform]: reorder-transform-example.md
Copy file name to clipboardExpand all lines: how-to-guides/odc-stac-example.py
+5Lines changed: 5 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -1,4 +1,9 @@
1
1
"""
2
+
This is a third party library based on Xarray, but not listed under the Xarray documentation.
3
+
4
+
If you have problems with the installation, please refer to [odc-stac installation](https://odc-stac.readthedocs.io/en/latest/intro.html#installation).
0 commit comments