pangeo-data / pangeo-rema

Project with Jonny analyzing REMA data
Apache License 2.0
0 stars 1 forks source link

try loading the data on a pangeo cloud cluster #3

Open rabernat opened 5 years ago

rabernat commented 5 years ago

For now we can use https://staging.ocean.pangeo.io. Soon there will be new clusters.

Here is some code I used to open the geotiffs.

import xarray as xr
ds_cog = xr.open_rasterio('09_41_8m_dem_COG_LZW.tif', chunks=512)

# visualize
import holoviews as hv
from holoviews.operation.datashader import regrid, shade, datashade
hv.extension('bokeh', width=100)

hv_ds = hv.Dataset(ds_cog[0].rename('dem'))
dem = hv_ds.to(hv.Image).options(cmap='blues', width=800, height=450, colorbar=True)
regrid(dem)

I got a cool interactive map

bokeh_plot (7)

jkingslake commented 5 years ago

I get the import error below when I run the open_rasterio line.

ImportError: /srv/conda/lib/python3.6/site-packages/rasterio/../../../libgdal.so.20: undefined symbol: _ZN9kmlengine4Href5ParseERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE

rabernat commented 5 years ago

This is a really annoying conflict that happens between rasterio and goeviews.

It seems to be a case of this: https://github.com/conda-forge/rasterio-feedstock/issues/48

You may have to rebuild your environment.

rabernat commented 5 years ago

p.s. My comment was not meant to imply that I know exactly how to fix it. This will take a little time and trial & error.

jkingslake commented 5 years ago

OK, I got it working on my machine, The plotting is really nice how it changes the resolution as you zoom! but I forgot to say in my previous comment that I was getting that error when trying to do this on the pangeo link you sent.