Data Science, GIS, Risk Management, Insuretech.
r_geometry = rasterize( shapes = [ (geometry, 1) ] , fill = 0, transform = trans, out_shape = (w,h), all_touched = True ) r_total = r_total + r_geometry Using rasterio we can store the result as a tif. r_total = np.expand_dims(r_total, axis = 0) file = '/home/daniel/Downloads/out.tif' with