holoviz / geoviews

Simple, concise geographical visualization in Python
http://geoviews.org
BSD 3-Clause "New" or "Revised" License
577 stars 75 forks source link

Export Grid data to geotif #68

Closed apiszcz closed 7 years ago

apiszcz commented 7 years ago

Is there a capability or possible approach to export the data set to a Geotif file? Thank.

philippjfr commented 7 years ago

@apiszcz Could you clarify? Do you mean exporting image data to geotiff or an actual plot? This may be something that's better handled by xarray.

apiszcz commented 7 years ago

Export to GEOTIFF. Ideally one could 'render' to GEOTIFF or screen, etc.

jbednar commented 7 years ago

Sounds like you want to take a GeoViews object and export it as GeoTIFF, which is different from the "rendering" that HoloViews does using matplotlib or bokeh to create image files, but I suppose it is analogous (using the data plus the metadata to generate a viewable object). I'd guess your best bet is to just get the data into a form that rasterio supports, then use rasterio to make the GeoTIFF. Not sure how much work that is; if it's trivial, probably don't need to add any support in GeoViews for that; if it's complicated, not sure where that complicated code would go. Some background:

https://github.com/pydata/xarray/issues/790

apiszcz commented 7 years ago

For now, I worked another path with rasterio.