I have raster data in a postgres table that I want to get into python as a numpy array. I am using psycopg2 to connect to the db. I am able to download the data but it comes back as a string (probably a serialized binary).
Does any one know how to take this string and convert to a numpy array?
I explored other options to download the raster such as use st_astiff and encode to download the hex file and use xxd but that did not work. I keep on getting the error 'rt_raster_to_gdal: Could not load the output GDAL driver' and I don't have permissions to set the environment variables to be able to turn on the drivers.
TL, DR: want to import raster data into a numpy array (using python).
No comments:
Post a Comment