Skip to content

Instantly share code, notes, and snippets.

@jhamman
Last active March 3, 2020 02:07
Show Gist options
  • Save jhamman/98464bf6dfcc72f8e2c1878edeae32c9 to your computer and use it in GitHub Desktop.
Save jhamman/98464bf6dfcc72f8e2c1878edeae32c9 to your computer and use it in GitHub Desktop.
In [4]: tif = cat['Houston-East-20170831-103f-100d-0f4f-RGB']['thumbnail']
In [5]: tiff_da = tif.to_dask()
Out[5]:
<xarray.DataArray (y: 552, x: 549, channel: 3)>
dask.array<xarray-<this-array>, shape=(552, 549, 3), dtype=uint8, chunksize=(552, 549, 3), chunktype=numpy.ndarray>
Coordinates:
* y (y) int64 0 1 2 3 4 5 6 7 8 ... 543 544 545 546 547 548 549 550 551
* x (x) int64 0 1 2 3 4 5 6 7 8 ... 540 541 542 543 544 545 546 547 548
* channel (channel) int64 0 1 2
In [6]: tiff_da.plot.imshow(rgb='channel')
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment