Feature request #17848

Allow to create raster layer programmatically from 2D array

Added by M R over 6 years ago. Updated about 6 years ago.

Status:Closed
Priority:Normal
Assignee:-
Category:Rasters
Pull Request or Patch supplied:No Resolution:invalid
Easy fix?:No Copied to github as #:25743

Description

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.

History

#1 Updated by M R about 6 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.

#2 Updated by Giovanni Manghi about 6 years ago

  • Resolution set to invalid

Also available in: Atom PDF