Can Rasterio generate a geoTIFF from a matrix?


Peter Oelslager <poelslager@...>
 

Hi,

I would like to create geoTIFF overlays for RF propagation.  Does Rasterio allow users to generate geoTIFF files from a matrix of values?  If that capability does not currently exist can I try contributing to the project?  I've been able to bit-bang out a couple geoTIFF files but its all sort of hacked together at the moment.  If this kind of feature sounds useful I would like to learn how to use git and contribute code to an actual project.

Thanks.
-Pete


Luke
 

Is your matrix of values a numpy array? You can easily create a GeoTIFF in rasterio if you have an array of data and the basic metadata (georeferencing, dimensions, band count, data type).

https://rasterio.readthedocs.io/en/latest/quickstart.html#creating-data
https://rasterio.readthedocs.io/en/latest/topics/profiles.html
https://rasterio.readthedocs.io/en/latest/topics/writing.html