This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| In [7]: import satsearch | |
| In [8]: results = satsearch.Search.search( | |
| ...: collection='landsat-8-l1', | |
| ...: bbox=[43.16, -11.32, 43.54, -11.96], | |
| ...: sort=['<datetime'], #earliest scene first | |
| ...: property=["landsat:tier=T1"]) | |
| ...: | |
| In [9]: catalog = intake.open_stac_item_collection(results.items()) | |
| In [10]: catalog | |
| <satstac.itemcollection.ItemCollection at 0x7f96efe16828> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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') |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| In [1]: import intake | |
| In [2]: catalog = intake.open_stac_catalog( | |
| ...: 'https://storage.googleapis.com/pdd-stac/disasters/catalog.json', | |
| ...: name='planet-disaster-data') | |
| ...: | |
| In [3]: list(catalog) | |
| Out[3]: | |
| ['20170831_172754_101c', | |
| '2017831_195552_SS02', | |
| '20170831_195425_SS02', |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| store = zarr.RedisStore(port=args.port) | |
| root = zarr.group(store=store, overwrite=True) | |
| t = 0 | |
| while True: | |
| arr = root.zeros(f"{t}", shape=grid.shape, chunks=(25, 25)) # create a new array for this timestep | |
| arr[…] = grid # write data to zarr array | |
| t += 1 # increment the time counter | |
| time.sleep(update_interval) | |
| grid = update(grid, N) # evolve the model one time step |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.