Add function to_rasterio + fix #31
As discussed in #31 (closed), I propose to add a function to_rasterio
which will return image as numpy array and a dict containing metadata required to later write the image using rasterio.
Here is an example of a rasterio metadata dict (A.K.A. rasterio object's profile
) :
{
'blockxsize': 128,
'blockysize': 128,
'compress': 'lzw',
'count': 1,
'crs': CRS.from_epsg(4326),
'driver': 'GTiff',
'dtype': 'int32',
'width': 43200,
'height': 17400,
'interleave': 'band',
'nodata': -9999.0,
'tiled': True,
'transform':
Affine(0.008333333333333333, 0.0, -180.0,
0.0, -0.008333333333333333, 85.0)
}
Edited by Cresson Remi