Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Is it possible to write datashader output to a raster file? #590

Closed
darribas opened this issue Apr 24, 2018 · 3 comments
Closed

Is it possible to write datashader output to a raster file? #590

darribas opened this issue Apr 24, 2018 · 3 comments

Comments

@darribas
Copy link

Hi,

I'm getting to know datashader and I'm finding it incredible, congratulations! I'm working with a large batch of spatial points (XY coordinates in a given CRS). Is it possible/relatively straightforward to write the output of an aggregation with datashader into a say GeoTIFF file that can be open in standard GIS and used to be merged with other spatial data (e.g. GeoJSON in geopandas)?

Thanks,

]d[

@jbednar
Copy link
Member

jbednar commented Apr 24, 2018

Thanks! The output of a datashader aggregation is simply an XArray, so you can do anything you want with the output, if it can be done with an XAarray object. XArray's I/O docs show how to read and write NetCDF and how to read GeoTIFF, but I don't see anything about writing to GeoTIFF. Can you use NetCDF instead?

In any case, if you make a good example of writing Datashader output and integrating it with GIS software, we'd love to include that for other Datashader users to have as a guide.

@jbednar
Copy link
Member

jbednar commented Apr 24, 2018

BTW, sometime this year we are scheduled to add support for slippy-map tiles, which will let you set up a tile server that you can use with any GIS system that supports Web Mercator tiles...

@apiszcz
Copy link

apiszcz commented Apr 24, 2018

Possible solution.

  1. Create the canvas with the size (per pixel) desired.
  2. use datashader aggreate, flipud
  3. use rasterio to create the geotiff.

@jbednar jbednar closed this as completed Dec 19, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants