Feature request #17848
Allow to create raster layer programmatically from 2D array
|Pull Request or Patch supplied:||No||Resolution:||invalid|
|Easy fix?:||No||Copied to github as #:||25743|
Since it is possible to create vector layers programmatically via the 'memory' provider, the same should be possible for raster layers. I'm not talking about support for taking a handle to a GDAL layer (although that would be awesome as well). I know that raster layers can be huge so this would be a concern of plugins to decide whether they want to use this simple keep-the-whole-layer-in-memory approach or write a custom plugin layer class, which is often a very non-trivial thing to do.
#1 Updated by Maik Riechert over 2 years ago
- Status changed from Open to Closed
Nevermind, I think there's actually no need for this given that you can create in-memory GDAL layers using their VSI feature: http://www.gdal.org/gdal_virtual_file_systems.html Then you just point QGIS to the VSI path and it opens. One way to remove the in-memory resource again would be to attach to the on-delete event of the layer and then remove the VSI resource using GDAL's API.