Questions tagged [memory-layer]

A temporary layer created in the computer's memory only, and not written to the hard drive. Normally created as an intermediate step in a larger geoprocessing task.

Filter by
Sorted by
Tagged with
1
vote
2answers
49 views

Geometry of layer disappears when creating scratch/memory layer with script

I'm trying to write a Python script (QGis 3.4.9) to create a group of scratch-layers (polygon, line and point). When it is inside the function the layer is created as it should, but when the function ...
2
votes
1answer
49 views

Create Memory layer in pyQGIS with projected coordinates

I am trying to make a memory layer in QGIS using python and then generate a grid base on calculations in meters. When I run the script, a banner comes and says the CRS is not defined. Then when I look ...
2
votes
3answers
164 views

How can I save a vector layer to memory (or is there a reason QGIS doesn't allow this)?

It's impressive how many different vector file formats QGIS (using ver 3.6.0) allows me to save a layer as: But as far as I can tell, QGIS doesn't allow me to save a vector layer to memory. In my ...
1
vote
0answers
20 views

Qgis Python Plugin leaves orphaned variables in RAM, even after plugin reload [closed]

My python plugin for QGIS 2.18 opens files with millions of features. To convert them in Qgis readable format, I run through several external python libs, one of them is a R-Tree tool, consuming 10G ...
3
votes
1answer
726 views

How to use a memory layer for processing algorithms in QGIS 3

I would like to run a processing algorithms in QGIS3 with a memory vector layer as result. When I define the memory layer as shown in the following, I get the error Incorrect parameter value for ...
6
votes
2answers
6k views

Where are the temporary output layers from QGIS processing algorithms stored?

Context I have always worked with memory outputs from several QGIS geoalgorithms within the Processing Toolbox. If it wasn't specified a location when saving the result, the output was stored as a ...
3
votes
1answer
219 views

Save the result of raster calculator as an memory layer in pyqgis

I am using QGIS raster calc as below. Now I am saving it as a tiff. But is there a way that I can save it as a memory layer? I want to refer to that resulting memory layer and polygonize it, and ...
6
votes
1answer
429 views

Memory Leak when deleting a layer

I am working on a project based on QGIS API c++ 2.8.2 and qt4.8. I have two methods in a class, the first create a layer and add a point Here is the code for the creating: LibCartoError CMyQgsS57::...
2
votes
2answers
411 views

geometry less memory layer in QGIS

I'm writing a QGIS plugin and I need to create a table with some attributes that, in a second moment, I'll load in a SpatiaLite database. The table is created as a memory layer, but as I said, it is ...
2
votes
2answers
1k views

QGIS 2.10 Unable to add features to a memory layer

I'm trying to add features to a memory layer. This is the layer creation : memlayer=QgsVectorLayer("{zr_typegeom}?crs=epsg:4326".format(zr_typegeom = typegeom), "memlayer", "memory") ...
1
vote
2answers
543 views

How to change attributes values in a memory layer?

i want to change attributes values in a memory layer. I already asked a similar question but i'm re-stuck on the problem and don't find any solution to this basic need. Here is what i'm doing so far ...
1
vote
1answer
357 views

Updating an Open Attribute Table

A work-in-progress plugin's dialog window contains a rolodex which allows the user to cycle through a timeseries of data; updating the relative memory layers geometries with each new time selection. ...
5
votes
3answers
4k views

-9999 (no data value) becomes 0 when writing array to GDAL memory file

I am trying to reproject and resample (1000m ->> 30m) a raster image (shape 238X406) using gdal.ReprojectImage() function in Python. The input file has -9999 cells as no data value. The result is an ...
2
votes
0answers
180 views

Creating new empty vector layer that has same set of atributes as another layer and then copying subset of features into it

I am new to both Python and QGIS. Here's a sample of my code: unique = layer.uniqueValues(index) attributes = layer..dataProvider().fields().toList() assistant_layer = QgsVectorLayer("Point", "...
2
votes
1answer
1k views

Creating new empty memory layer with fields scheme from other layer in QGIS?

Being new with python so far, I got inspired by this answer: https://gis.stackexchange.com/a/155988/8202 to dive into it a bit. When creating features in a new target layer from an existing source ...
4
votes
1answer
1k views

Failed to create memory layers in QGIS application on Linux

I have written a python class which reads properties of map layers from an XML file and creates appropriate memory layers. I have developed and tested this code with QGIS 2.8.2 on a Windows 7 machine (...
1
vote
2answers
849 views

Use raster memory layer from QGIS processing result

I want to apply subsequent QGIS raster processing algorithms in a python script. I want to use memory layers for intermediate calculation results since I am only interested in the end result. As ...
4
votes
1answer
843 views

Error writing memory layer to shapefile in QGIS

I have created a memory polygon layer in my QGIS plugin. Then I added a buffer based on a point. I can see the ploygon memory layer in the map canvas and I can save it to a shapefile from the main GUI....
2
votes
1answer
3k views

What is a memory vector layer in QGIS?

What is a memory vector layer and how does it relate to the vector layer? Background info: I have a volunteer working with my organization, because of financial reasons we have him using QGIS. He ...
1
vote
0answers
367 views

QGIS-Processing runalg and Memory Layer issue [duplicate]

I'm trying to make a script for converting polygons to lines. But I'm having some issues while generating temporary layers. In this script, I iterate through all the features of the input layer to ...