Skip to main content

Questions tagged [virtual-field]

Filter by
Sorted by
Tagged with
1 vote
0 answers
26 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 ...
xsmet's user avatar
  • 11
0 votes
0 answers
29 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, ...
Steve's user avatar
  • 785
2 votes
1 answer
106 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 ...
MartinMap's user avatar
  • 8,358
0 votes
0 answers
50 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 ...
Kay's user avatar
  • 1,856
1 vote
1 answer
108 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 ...
gissurfer's user avatar
2 votes
1 answer
89 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 ...
gissurfer's user avatar
3 votes
1 answer
234 views

Summing line lengths inside each polygon in QGIS

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 ...
MarinT's user avatar
  • 75
3 votes
1 answer
196 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 ...
bugmenot123's user avatar
  • 11.1k
0 votes
1 answer
466 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 ...
Marcelo Franco Patané Júnior's user avatar
3 votes
1 answer
327 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 ...
MiroD's user avatar
  • 67
1 vote
0 answers
146 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).
Miloslav Charvát's user avatar
2 votes
0 answers
74 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 ...
jerjc0's user avatar
  • 85
6 votes
2 answers
300 views

Getting attribute information of multiple polygon intersected by line using QGIS

I have a map with 'Layer A' (polygons representing cities) and 'Layer B' (lines representing roads). I would like to add a virtual field on my 'Layer B' table with the name of every city crossed by ...
Arthur's user avatar
  • 893
8 votes
1 answer
257 views

Getting index of virtual field using PyQGIS

Im using QGIS 3.18.2 and I want to get the expression string of a virtual field in PyQGIS. QgsVectorLayer.expressionField() is supposed to return the expression string. It takes the index (index: int) ...
malbles's user avatar
  • 318
1 vote
1 answer
116 views

Why are the labels not displaying the correct (virtual) attribute values?

I have a polygon and I create a new field area_ha using this expression in the field calculator: round( $area /10000,1) When I use that field for my labels, everything is fine and works as it should ...
Enzo Baldini's user avatar
  • 2,367
1 vote
0 answers
112 views

Aggregating Virtual Fields in the QGIS Layout

I have an atlas creating maps of parks. These parks contain different areas with different types of surfaces, which need to be managed differently. In my map-layout I'd like to summarise the area of ...
Zev_Zide's user avatar
  • 187
2 votes
1 answer
483 views

Using Virtual Fields in Views in QGIS

I'm trying to summarize some information in a map layout in QGIS controlled by an atlas. I have parks, and connected to that I have objects within these park (points, lines and polygons). I want a ...
Zev_Zide's user avatar
  • 187
3 votes
2 answers
288 views

Counting items in another table in QGIS

I have two tables, the table 'fruit' contains a list of fruits (see figure 01). The 'municipality' table shows in the column "execucao01" which fruits exist in each municipality (see figure ...
Denilson's user avatar
  • 695
1 vote
2 answers
195 views

Follow-up query on "QGIS expression for label text to display vertex coordinates of polygons"

Just a follow-up query about the existing thread QGIS expression for label text to display vertex coordinates of polygons. Is there an expression in QGIS to collect all the coordinates from the ...
ROEL SANTIAGO's user avatar
3 votes
2 answers
168 views

Adding incremental id value to features with certain attribute value

I am using QGIS 3.12. I have a layer of trees and a virtual field 'tree number' that counts all trees that I add to the layer ($id). I want to set that if a height of a tree is more than 3 (in field '...
YuvalM's user avatar
  • 399
2 votes
2 answers
259 views

How to add virtual (e.g. $area) fields to multiple layers

I wondered if I could add virtual fields to the feature tables of a number of polygon layers in a QGIS 3 project (or a geopackage). As an example, I would like to add the virtual field area (km²) as ...
aae's user avatar
  • 377
6 votes
3 answers
548 views

Update virtual field on demand (not permanently) (QGIS)

I quite often use virtual fields. Some of them are relatively complex aggregates. Since virtual fields updates on every input, by moving the map, open the attribute table and so on, it can cost a lot ...
MartinMap's user avatar
  • 8,358
1 vote
0 answers
103 views

Organizing columms in QGIS 3.14

I am using QGIS 3.14. I want to organize my columns in the attribute table but I cant change the virtual fields columns place. It is always last. Can I put it between two non-virtual fields columns?
YuvalM's user avatar
  • 399
0 votes
0 answers
490 views

Fid on QGIS 3.12

I am using QGIS 3.12. I created a new geopackage and in the fid field I want to see the feature number, according to the number of features I have created but it only say "autogenerate". What can I do?...
YuvalM's user avatar
  • 399
1 vote
1 answer
761 views

Access Google Cloud Data using VSIGS

I want to access landsat data from gcp-public-data-landsat bucket using vsigs . My code looks like , import os, sys from osgeo import gdal print(gdal.VersionInfo('–version')) print(sys.version) ...
Souvik Sankar Mitra's user avatar
5 votes
1 answer
1k views

Forcing virtual field recalc in attribute table in QGIS

I have a layer with a virtual field, "LongLabel", an expression concatenating several of its data fields. When I edit a feature's data fields in the layer's attribute table/form, how can I force the ...
Houska's user avatar
  • 8,316
1 vote
2 answers
171 views

Importing Virtual field in a geopackage

I have defined a virtual field to generate additional information in dependence of another attribute. Now I want to import the shape in a geopackage. I want to have the virtual field in the geopackage ...
Dieter Riedel's user avatar
7 votes
4 answers
2k views

Placing data-defined labels both by expression and manually

In my project layers (QGIS 3.6.2) I use data-defined label placement. I am trying to set up the placement as follows: By default, the placement chosen in Label Settings is used (in my case, "around ...
Nathan's user avatar
  • 1,304
1 vote
0 answers
153 views

QGIS automation field from Excel

I present the following situation. 1 - Draw polygon shape in QGIS 3.4 / geopackage, only with two columns ID and NUM_SETOR, using the google maps image as reference. 2 - Excel table where I combine ...
Denilson's user avatar
  • 695
2 votes
0 answers
315 views

Changing Virtual field properties in QGis 3.0

I have some existing virtual field with set Length and Precision An example: The formula was first set to rounding it by 2 digits With the current settings it displays 10.00 instead of 10 because of ...
Rubedo's user avatar
  • 329
2 votes
1 answer
503 views

Deleting virtual field in QGIS?

I'm trying to delete a virtual field from a layer attribute table. The layer source is a Spatialite database so I know that it's not straightforward to remove permanent fields, but as I understand it ...
Libarch's user avatar
  • 83
4 votes
1 answer
1k views

QGIS 2.16 Creating virtual field with aggregate expressions

With QGIS >=2.16, it is possible to use aggregates in expressions, such as sum, average... etc. But when I use it to create a new virtual field using the field calculator, the newly created field ...
tumasgiu's user avatar
  • 361
4 votes
1 answer
382 views

Using virtual fields as join fields in QGIS fails (NULL values in joined fields)

I have a point shapefile and a CSV file containing various attributes and three columns (here: street,num,addnum) based on which I would like to join both tables like attribute1;...;attributen;street;...
Jochen Schwarze's user avatar
1 vote
1 answer
440 views

Is there a way to copy virtual fields from one project to another?

I have a project with several layers, each of which has several quite complex virtual fields in order to analyse a particular site. I'd like to perform a similar analysis of a new site in a new ...
user avatar
3 votes
3 answers
680 views

QGIS add virtual field to csv layer

In QGIS 2.14.3 added a csv file as a layer. Attempt to add a virtual field like shown in the screenshot below (same result with "field_14" || ' ' || "field_10" || "field_11"): The field is created ...
Jochen Schwarze's user avatar
1 vote
2 answers
1k views

Deleting virtual fields in QGIS

I can't find the option to delete a Virtual field on a layer, not even in the Table Manager plugin. Where is that option?
Egidi's user avatar
  • 3,758
8 votes
1 answer
2k views

Creating Virtual Field in QGIS Python Console

Is there any example about how to create a virtual field and subsequently change the attribute of a non-virtual field without wiping out the virtual field? Both are required to be done in the Python ...
Ken T's user avatar
  • 468