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/appendix/faq.md
+4Lines changed: 4 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -17,3 +17,7 @@ We would encourage users who are interested in larger-scale analysis to get in t
17
17
Strips can appear empty (i.e. `NaN` values) when photogrammetry fails (due to cloud, water, etc) or it is masked by the PGC bitmask. Data previewed by the `pdt.load.preview()` function is masked according to this bitmask, and data loaded by the `pdt.load.from_search()` function is also masked by default (this can be disabled by using the `bitmask = False` option).
18
18
19
19
As a result, it is entirely possible that the `search()` function can return a valid datastrip that covers a sufficient proportion of the AOI to meet the `min_aoi_frac` requirements, but it will appear empty (i.e. all-`NaN`) when viewed. The `preview()` function will help you identify these 'empty' scenes, but there may still be (poor-quality) data present if it is downloaded using the `load.from_search()` function with `bitmask = False`.
20
+
21
+
#### Q: Can I load DEMs as `dask` arrays, and/or enable lazy evaluation for downloads?
22
+
23
+
Yes! Like the [`rioxarray.load_rasterio()`](https://corteva.github.io/rioxarray/html/rioxarray.html#rioxarray-open-rasterio) function they wrap, `load.from_search()`, `load.mosaic()`, and `load.from_fpath()` accept a `chunks` variable (e.g.`(50, 50)`, `True`, `"auto"`), which triggers loading as a `dask` array (and, as a bonus, will result in 'lazy evaluation', where the data is not downloaded or computed until it is needed by a further command).
"Note, these are 2 m strips that will take a while to download! To save on added time when rerunning this notebook, I've added an additional test to the function: if we've already downloaded the DEM and saved it to the local directory, this function will instead load it from the local file location using the `load.from_fpath()` function.\n",
535
533
"\n",
534
+
"> ⚠️\n",
535
+
"> **NOTE**: More advanced geospatial python users may wish to note that DEMs can be loaded as `dask` arrays, enabling lazy evaluation and only triggering download when required by a further command. This is done providing a `chunks` parameter to `load.from_search()`, `load.from_id()`, or `load.mosaic()` (e.g.`(50, 50)`, `True`, `\"auto\"`), as is the case for [the `rioxarray.load_rasterio()` function that it wraps](https://corteva.github.io/rioxarray/html/rioxarray.html#rioxarray-open-rasterio).\n",
536
+
"\n",
536
537
"Regardless, we can now use this function to select and download relevant rows from our geodataframe using the standard Pandax indexing method (`DataFrame.iloc[[i]]`, where `i` is the desired row index):"
0 commit comments