Open ARiisgaard opened 4 years ago
Have you tried
band = src.GetRasterBand(0)
instead of
band = src.GetRasterBand(1)
?
I just checked swapping the band - it returns 'NoneType' object has no attribute 'ReadAsArray'
Running "gdalinfo testRaster.tiff -mm" returns that the data in band 1 ranges from:
Band 1 Block=960x2 Type=Int32, ColorInterp=Gray Computed Min/Max=0.000,14663.000 NoData Value=-2147483648
There is no other bands in the file.
I'll check up on the GeoViews
I have attempted to visualize my test raster file in Bokeh, however I have not succesfully loaded a colored file.
Only the nodata cases get visualised when I load the data in the same fasion, which Sarah originally did:
I pressumed that the issue was similar to the mbtile issue (that values in the tiff goes beyond 255), so I tried using "gdaldem color-relief" to create a colored file, but I don't really know how to run the code above with multiple bands. I can do it using this approach, but that is treating the tiff like an image file, not a part of a map. Which might give some issues later on.
Another approach I attempted was using Rasterio, which do give a fine result, but these are not interactive. And I'm not sure if there is an easy approach to add them to a figure