-
How can I use rasterio read gdal dataset created in memory? for example: mem_driver = gdal.GetDriverByName('MEM')
# get source epsg
ds = mem_driver.Create('', WIDTH, HEIGHT, BANDS, gdal_type)
ds.SetProjection(projection)
ds.SetGeoTransform(geoTransform) I have try to use memory file path in gdal, but it's failed. vsi_mem_file_path = f'/vsimem/{uuid.uuid4().hex}.tif'
gdal.GetDriverByName('GTiff').CreateCopy(vsi_mem_file_path, ds)
with rasterio.open(vsi_mem_file_path ) as ref_src: How can I use rasterio to read Thank you for your concern and help. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 3 replies
-
@sqwev GDAL's |
Beta Was this translation helpful? Give feedback.
I ran this on my macbook. osgeo.gdal and rasterio are installed from conda-forge, the latest of each. If you installed from a different conda channel, it would be good to reinstall from conda-forge.