Skip to main content

Questions tagged [expression]

Expressions are SQL-like statements that are used to evaluate dynamic properties.

Filter by
Sorted by
Tagged with
1 vote
1 answer
25 views

QGIS - Filter value relation by crossing 2 arrays

I'm working on a value-relation to filter a list based on the content of 2 fields. The value relation is based on the field "IDC". I want to compare the content of the field "IDC" ...
Giene's user avatar
  • 753
1 vote
2 answers
50 views

QGIS - Extract with expression - one occurrence each - if ID IS NULL

I'm currently configuring the 'Extract by expression' algorithm to achieve the following: Keep all values where 'ID_IMPCT' IS NOT NULL. Keep only one occurrence of each unique feature in 'LIB_PHYSIO' ...
Giene's user avatar
  • 753
1 vote
0 answers
44 views

QGIS Atlas - show child features of adjacent parents

In my QGIS project, I want to create an atlas layout. I have a 1:n relation set up (both layers have an index1 field which acts as primary/foreign key) between my parcel and my owner table. The layout ...
sn1ks's user avatar
  • 3,022
1 vote
1 answer
55 views

QGIS Raster Calculater Syntax - unable to combine 2 expressions

I have a slope (in degrees) of a DEM where I'm attempting to assign various values to various bands via Raster Calculator. The individual expressions work, but when combined they do not. ("slope-...
IanGS's user avatar
  • 386
1 vote
1 answer
34 views

Returning an attribute of the intersecting polygon-feature of a point in a QGIS print layout expression

I am working on a print composer layout, and want to dynamically define a text field with an expression. In my QGIS project, I have a vector layer with polygons ("Polygons") with no overlaps,...
Niklas Leykauff's user avatar
1 vote
0 answers
38 views

How to select mesh elements using an expression?

I'm using QGIS (3.34.7) and I'm trying to get a grip on meshes. In this example, I'd like to select mesh elements within a polygon layer (and later export them). QGIS (3.22) introduced "Select ...
pumpaij's user avatar
  • 11
0 votes
2 answers
81 views

How to Activate Hyperlink in Pop-up From Attribute Field

I am building expressions in a pop-up in AGOL Web Map. A specific field in the attribute table I am drawing from has URLs in each cell. When I drop the field name into the pop-up from the Fields List, ...
TheOmoSlide's user avatar
0 votes
1 answer
32 views

Display point labels alternatively to left and right

I am working in QGIS and I have a point layer whose labels are to be displayed left or right of the point. The formula I tried to make it work is, in label placement, selected Offset from Point mode, ...
Trikelians's user avatar
1 vote
0 answers
50 views

QGIS Graphical Modeler: Dropdown list of strings based on fields values from another Layer

I have a graphical modeler where I need to type the name for a desired region as a string and extract some data matching the name of the region from an layer of another geopackage. In the following ...
Denis Crîlov's user avatar
0 votes
0 answers
31 views

"Extract by Expression" works manually, but not in model [duplicate]

I have a QGIS project (v 3.34.0) where I run a model to calculate distances from all building facades to the nearest road. The last step in the model is to extract only those line features (the ...
mtwente's user avatar
3 votes
1 answer
73 views

QGIS Draw line form nearest parcel midpoint side facade to point

I have the following two layers: 'PARCEL' with polygon geometry corresponding to parcels. 'POINTS' with point geometry corresponding to the segmentation of the 'WAYS' layer at a distance of hectometer....
Nil Aspinall's user avatar
2 votes
1 answer
143 views

QGIS: Count points directly left/right of line using geometry generator

I have a line layer and a points layer. I am trying to count the points that are within 500 meters directly to one side of my lines. I have entered the following code into Value As far as my ...
Gregory C's user avatar
  • 413
2 votes
1 answer
87 views

Calculating field using expression taken from DataFrame with PyQGIS

The sample data can be downloaded here: https://github.com/jude9apple/sampleData I am using PyQGIS in QGIS 3.36 (in PyCharm) to run a script which reads a table containing which processes apply to ...
Juliette Lapeyre's user avatar
0 votes
0 answers
26 views

Return all values based on associated field

I have a list of classification systems called "GRIDCODES." Each "GRIDCODE" is associated with a province ("name"). And each province can have more than one GRIDCODE ...
Rami Stucky's user avatar
2 votes
1 answer
42 views

Populate a value automatically based on the current value of another attribute using a QGIS form

I have two tables: tableA with two attributes (city names and cityID). In tableB, I have several attributes, including the same attributes as in tableA. In tableB, when I add a new entity and fill in ...
GisUser's user avatar
  • 647
1 vote
0 answers
41 views

QGIS 3.34: field with expression not editable

In a current project I have a LineString Layer (called 'Test') with two fields "MDB" and "ML" which have a default value expression that automatically fills in true/false and ...
delmarzo's user avatar
1 vote
1 answer
29 views

Expression Builder using times

I have brought in vector layer from a .csv file containing Total Response Time for Emergency Services Incidents. While the times are in HH:MM:SS format I believe that having brought it in as a .csv ...
Mark Leander's user avatar
2 votes
1 answer
131 views

Using IF statement in Field Calculator to write values into new field based on another field

For some QGIS-OSM import tasks, I'm trying to create a new attribute field for objects based on existing attributes in the Field Calculator. In short, for all the objects with the existing field CLASS ...
Nelg's user avatar
  • 175
0 votes
0 answers
36 views

Expression Builder/Data Defined Labels Equally Spaced along Y Axis

I want to create a series of labels that are organized vertically but equally spaced so they do not overlap. I am using some data defined expressions to organize them along the X axis just fine. ...
Rami Stucky's user avatar
2 votes
1 answer
69 views

QGIS: Displaying labels outside polygons for line features inside using field values

How can I display labels for line features in a QGIS line layer, where the label should appear outside a polygon if the line feature is inside the polygon, and otherwise appear as it is? I have ...
Anup Kumar Mohapatra's user avatar
0 votes
1 answer
35 views

QGIS - Avoid duplicates on Value-Relation widget

In QGIS, I'm working with two layers that are related to each other through the value-relation widget. Layer 1: TEST fields: "id"; "LIB"; "odc_ID"; "Code" ...
Giene's user avatar
  • 753
2 votes
1 answer
75 views

QGIS Field Calculator Expression: get field name for value at specific index

I am looking for a way to search the field name ( green circle ) of a value at a specific index. In the example shown above I would like to find the field name "25 x 2,3" for the value of ...
Denis Crîlov's user avatar
0 votes
1 answer
70 views

QGIS rank by category

I have a dataset with two attributes: Attribute 1: A , B, C Attribute 2: 1, 2, 3, 4 I want to rank Attribute 2 but with a separate rank for each value in Attribute 1. I already did the ranking by ...
Luma's user avatar
  • 3
1 vote
1 answer
57 views

QGIS autoincrement ID for groups

I have an attribute table containing information about area, region, and samples. The table structure resembles the example shown below: My goal is to automate the generation of IDs when adding new ...
Fjedsen's user avatar
  • 13
3 votes
1 answer
87 views

Display point with heighest value in group of points

I have a point layer with some points to be aggregated by a field named "NumeroNom" (only a substring of it) and I want to display only the point with the highest value of another field ...
dmjf08's user avatar
  • 1,293
2 votes
1 answer
98 views

Forbid create line between the same point through geometry expression

I have a point layer and I create line between its points (like a graph) through geometry by expression collect_geometries( array_foreach( aggregate('point_layer','array_agg',$geometry), ...
redhat's user avatar
  • 347
0 votes
0 answers
35 views

How to get crs_description from EPSG-Code?

I'm searching for an expression in QGIS to get the description of a CRS Assume I have following table: Area EPSG desc A1 EPSG:31258 A2 EPSG:31255 Now I want to fill in the "CRS-Description&...
Stefan's user avatar
  • 74
1 vote
2 answers
84 views

QGIS Expression CASE WHEN AND AND [closed]

I am failing at making a case with many (3) conditions. I have different contract cases (f.e. Nutzungsvertrag) and i want to create a virtual column where contracts of a certain type are summed up ...
Marek's user avatar
  • 537
3 votes
2 answers
141 views

QGIS Field Calculator Expression to retrieve index of specific value

I have two tables: [see image beloW] HAK where the Column "Volumenstrom_h" has the input value ( x ) needed for the linear interpolation formula displayed which can be seen surrounded by ...
Denis Crîlov's user avatar
3 votes
1 answer
123 views

QGIS: show attributes of different colums in legend

I'd need to classify and display on a map different land cover symbols by its Corine Land Cover codes, but in the meanwhile I'd like to show them in legend as symbol (based on UDSCOD) + code (UDSCOD) +...
SirB1's user avatar
  • 185
1 vote
1 answer
63 views

PyQGIS layer action: Select features within buffer having the same field value

By means of a PyQGIS layer action, I am looking for a way to select all polygon features within a buffer polygon sharing a certain field value (e. g. provinces belonging to the same country) with the ...
ebcs's user avatar
  • 49
1 vote
1 answer
57 views

Calculating attibute for a layer objects based on objects of another layer

I have a point layer. The points have float attribute "cost". I also have a line layer with a simple line between every two points from the point layer. I want to calculate a new attribute ...
redhat's user avatar
  • 347
2 votes
3 answers
469 views

Making an octagon using QGIS geometry generator

I am a self-taught QGIS user and am trying my hand at the geometry generator. I have been tasked with creating a map that has gazebos as points. There are so many easier ways to get a polygon like the ...
Madeline Cox's user avatar
3 votes
4 answers
259 views

Extracting 'hour' from 'time_stamp' with QGIS

I am trying to extract the hour from my time_stamp which is in the format dd/mm/yyyy 00:00:00 as a textstring. I am using the expression hour("time_stamp") in the field calculator, but the ...
Eleanor Baker's user avatar
6 votes
1 answer
184 views

Differentiating with unique id overlapping/intersecting or isolated convex_hulls in QGIS

From a layer of 2000 points, I have a field with the name 'NUCLEUS' with four categories (1, 2, 3, 4) that identifies each point with a category of density clusters. In red color you can see the ...
Ingrid Ingravida's user avatar
0 votes
0 answers
56 views

QGis-Modeler: Using "Basic statistic" values for "Extract by expression" - Outliers

I'm working on Qgis 3.34.0. with Model Designer. I'm working with soil data (Organic matter for example). I have 2 data sources, "cal OM" and "lab OM". The data I'll use will be &...
Matias Z's user avatar
1 vote
1 answer
53 views

Extent of a group of lines in a polyline shapefile

QGIS, shapefiles I have a map with a polyline layer representing streets of a village I have a shapefile without geometry, with the lists of responsible peoples for streets, each of them is reponsible ...
ClaudeVer's user avatar
  • 630
2 votes
1 answer
118 views

QGIS - atlas print composer how to display mutiple values when adding attribute table?

I have this attribute table. I locked my atlas generator by county. For each, I want the statistics of all the cities that are in each county. For example : If the page of SICARIO is showed I want : ...
Sarah BOUTARD's user avatar
0 votes
0 answers
48 views

QGIS - How to show only one value when having multiple same values by expression [duplicate]

I wonder how could I show by expression only one labels when having the same values multiple times? Does an "unique" function exists in QGIS? For my column "abrev_county" I would ...
Sarah BOUTARD's user avatar
6 votes
1 answer
190 views

Drawing an arc with length proportional to a distance in QGIS

From two points layers: 'ORIGIN' → Origin point at coordinate 0,0 'CLUSTERS' → Points identified by cluster with field "CLUSTER_ID" I am drawing a line from each point in the 'CLUSTERS' ...
Ingrid Ingravida's user avatar
3 votes
2 answers
248 views

Loop through fields in QGIS calculator with condition: count fields with values >0

I have a dataset, a polygon, with several columns, let's say: Site Species1 Species2 Species3 1 85 23 90 2 73 20 0 3 0 0 0 4 0 0 70 5 0 75 60 I have different sites and data about several ...
Oriol Baena Crespo's user avatar
1 vote
0 answers
52 views

QGIS - layout/ print composer and linking displayed maps

I wonder if it's possible to display a map in the layout/print composer when another is shown ? I have this layer where I've made some statistics with diagrams. It shows the percent of people that are ...
Sarah BOUTARD's user avatar
3 votes
2 answers
229 views

Recreating the shape of curved arrows with QGIS Geometry Generator

In QGIS, I have a line layer with straight lines, consisting only of two vertices: start- end endpoint. I can now use Geometry Generator (see below for the expression I use) to create a third point in ...
Babel's user avatar
  • 73.1k
4 votes
1 answer
97 views

Conditional value output in QGIS field calculator for array aggregation

I have a three point across x with five repeating rows with this attributes: [ 2, 1, 1 ] [ 1, 2, 2 ] [ 1, 1, 1 ] [ 2, 2, 2 ] [ 4, 4, 4 ] I want to calculate a new field which aggregates the rows, ...
ConfusedButterfly's user avatar
2 votes
1 answer
175 views

QGIS: Geometry By Expression - collect geometries from self selecting line excluding $currentfeature and change geometry [closed]

I am looking for a solution in QGIS in form of an expression that is collecting the geometries that intersect the $currentfeature ( excluding this one - the orange line ) and than iterate over the ...
Denis Crîlov's user avatar
2 votes
1 answer
161 views

Triangulation in QGIS

I need to triangulate fire observation bearings from multiple fire towers or points at known locations. The towers are known points on the map. Fire patrol officers may also provide an observation ...
Forestaus's user avatar
1 vote
1 answer
177 views

Rank and edit a field with the ranking number in QGIS attribute table

I want to fullfill the field HZ (using field calculator) with a rank number in wich several objects will have the same HZ number. Each time the previous fields are all equal, those objects should be ...
Rui's user avatar
  • 97
1 vote
1 answer
142 views

Moving (snap) lines to nearest features in QGIS

I have two sets of lines: Layer A (a planned network) and Layer B (how the network was realized). The course of the lines on those two layers is similar, but not the same and they do not have the same ...
Jackie's user avatar
  • 11
1 vote
0 answers
42 views

QGIS layout; Sum values in layout attribute table only in map window

I have produced a layout showing the polygons of grass verges to cut, and have placed an attribute table listing name and area (in m2) on the layout. I have selected 'show only features visible within ...
Jex's user avatar
  • 11
3 votes
2 answers
204 views

Classifying in QGIS into arbitrary number of percentiles instead of quantiles, based on attribute field value

Extending this question and this one: In QGIS, there are special expression functions for the first and third quartile (q1 and q3) and as well as median (median). So it's easily possible to categorise ...
Babel's user avatar
  • 73.1k

1
2 3 4 5
20