Questions tagged [virtual-field]
The virtual-field tag has no summary.
40 questions
0 votes
1 answer
62 views
Duplicating a layer to create a virtual field on it with PyQGIS
In a plugin I want to create a duplicate of the selected layer and add a virtual field including some symbology to it. I've tried the following, and it appears to do the what I want (imitate the "...
2 votes
2 answers
62 views
QGIS: Looking up values in a crosstab
Given data I have a layer1 as output of a model that has a field kmh and a field kfzh. Both are integer fields. kmh has one of the following values: NULL,0,7,10,20,30,40,50,60,70,80,90,100 kfzh has a ...
2 votes
1 answer
99 views
Adding Virtual field to layer from QGIS Graphical Modeler
Can a virtual field be added to a vector layer within a model (using a graphical modeller)? The goal would be to get a model output layer with the virtual field already declared and working. *I've ...
1 vote
0 answers
70 views
Labels defined with QGIS Expression and custom function not rendering in QGIS
In QGIS 3.34.5 I have a vector layer in QGIS with a large amount of attributes. I want to generate labels that only show relevant attributes. To do that, I define a PyQGIS function that takes a ...
0 votes
0 answers
44 views
How to add "virtual" editable fields to a feature class?
We have several feature classes (points and lines) on an Oracle geodatabase to which a third party tool needs two fields added. The third party tool would need read/write to these two new fields, ...
2 votes
1 answer
143 views
Calculating age of overlaying points with virtual fields in QGIS: optimize compute-intensive approach
I am working on a project in QGIS, where I have two point layers, named "Infrastructures" and "Inspections". In my system, whenever an infrastructure is inspected, a new point ...
0 votes
0 answers
74 views
QGIS3 copying field values from virtual to static field in Python
I want to store values from a virtual field to a static field (the file will be used externally and I need those calculated values from the virtual field hard coded). My idea was to write a python ...
1 vote
1 answer
143 views
Virtual layer accessing virtual field
I have a layer my_layer containing a virtual field virtual_1. Next step I want to create a virtual layer, which list only unique values (as a bonus also dissolves the geometries by unique values). The ...
2 votes
1 answer
159 views
QGIS - Let atlas iterate through distinct values of virtual field
I have a CSV-Layer with multiple columns (e.g. ID, owner_name) and well-known text data to contain information about polygons. One ID can be owned by to owners which would cause the feature to appear ...
4 votes
2 answers
329 views
Summing line lengths inside each polygon with QGIS Expression
In QGIS 3.26 I have polygon layers (districts) and line layers (roads) in my project. I need to sum the line lengths inside the polygons and write them in an attribute table of this polygon. The goal ...
3 votes
1 answer
252 views
Convert virtual field to "physical" field?
I created a virtual field "attr" for a vector layer in QGIS using a expression for the values. These values will be updated as data changes. How can I convert/materialize this virtual field ...
0 votes
1 answer
632 views
Create field with sequential automatic alphanumeric name in QField
I've created a series of layers in QGIS to collect data in field with mobile app QField. Each layer have a rule to make its names. For example, one layer is modeled to collect corn fields. It has ...
3 votes
1 answer
447 views
Creating Virtual Field from QGIS Python Console
I would like to create a new virtual field with a specific expression (like 2*"ID") on an existing layer. Is it possible to do so from the Python console? I've tried using addExpressionField ...
1 vote
0 answers
164 views
QGIS - Link derived coordinates to an attribute table
How can I link a field of derived coordinates and attributes to an attribute table? It cannot be copied manually, many lines (100,000).
2 votes
0 answers
81 views
How to speed up the rendering speed of layers with multiple virtual fields?
I am inputting data for power lines and tried using the normal field and imported it in PostGIS. But the some of the data inputs I needed must be refreshed constantly to obtain. So instead I used ...