I am trying to get the raster attribute table of the following file: Shift_cult_past_current_prediction_20160107_gr1DD.tif available here: https://www.dropbox.com/s/fmomfpro3j6dmz8/Shift_cult_past_current_prediction_20160107_gr1DD.tif?dl=0
Here is the code I am using:
import gdal
dataset = gdal.Open(dataset_uri) # dataset_uri is path to .tif file
band = dataset.GetRasterBand(1)
rat = band.GetDefaultRAT()
I am using gdal version 2.1.0 on python 2.7.11 (Mac and windows). However, while I get the raster attribute table on windows I get nothing on mac (10.9.5). What could I be doing wrong?
-- EDIT
$ conda list | grep 'gdal'
gdal 2.1.0 np111py27_1 conda-forge
No comments:
Post a Comment