Questions tagged [expression]

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

Filter by
Sorted by
Tagged with
0 votes
0 answers
29 views

Using scale in expression

This is a question/problem which arised from another issue: Assigning specific feature in expression builder. I've managed to use expression builder in order to move features according to the change ...
Niklas's user avatar
  • 25
0 votes
1 answer
28 views

ID expression links to the wrong feature

This is a question/problem which arised from another issue: Assigning specific feature in expression builder. The ID in the code does not seem to correspond with the right feature. Here's an example ...
Niklas's user avatar
  • 25
0 votes
0 answers
42 views

Moving labels with moving features

This is a question/problem which arised from another issue: Assigning specific feature in expression builder I´ve adjusted for features to be moved according to how the scale is changed, but I would ...
Niklas's user avatar
  • 25
2 votes
1 answer
76 views

Assigning specific feature in expression builder

I have a question regarding "Making tiny objects visible for their location when zooming out" in QGIS: Making tiny objects visible for their location when zooming out or more specifically ...
Niklas's user avatar
  • 25
0 votes
0 answers
23 views

Selecting raster over points using QGIS?

In a QGIS-Atlas, I want to display the name of the raster layer that lies under the current atlas feature using an expression. As coverage layer I use a point layer. I had thought of an expression ...
Janko's user avatar
  • 149
0 votes
0 answers
31 views

Accumulated distance between points

I have this piece of code that I can make lines between points and calculate the length of the line, but now I need to calculate the accumulated distance only between the X axis, I managed to use ...
Mestrexama's user avatar
1 vote
0 answers
57 views

Using Aggregate Expression in QGIS Graphical Modeller

I want to create a graphical model in QGIS. The model will input a polygon and a point layer and then add an attribute to the polygon that counts the number of points inside (intersects). I know that ...
Stat-R's user avatar
  • 917
2 votes
0 answers
61 views

How to group points by distance and plot a minimum circle with a constant radius with centroid in the grouping

I am working with the following expression to try to draw a minimal circle of constant radius that groups the points by nearest: minimal_circle ( convex_hull( collect( $...
Ingrid Ingravida's user avatar
0 votes
1 answer
38 views

Equation with log and power in Google Earth Engine

I am trying to calculate total suspended solids using Sentinel 2 in GEE with this equation TSS = 172.191 * log(pow(2) (Green/Red))) − (190.809 * log(Green/Red)) + 61.6 I write this code and it doesn'...
Rasha Hosny's user avatar
0 votes
0 answers
17 views

Summarize Two Overlapping Layers Within a Third Layer

My project has 3 relevant layers, 2 with data I wish to extract and a 3rd representing the geography I need a summary of. Landuse, Field "Use" (values x y z), Soils, Field "Soil Type&...
Sean Kennedy's user avatar
2 votes
2 answers
67 views

Update field automatically when adding a new entity

I am trying to automatically update the content of several fields, when the first one is completed. If the value in the first field is not found, then nothing. But if the value is found, then the ...
Giene's user avatar
  • 447
1 vote
1 answer
62 views

Auto-increment with expression, depending on other fields, in QField

I'm trying to auto-increment a field "ID-Station" by using an expression. The expression depends on another field, "Sampler". These are my fields : Sampler : picklist with ...
Fred's user avatar
  • 21
3 votes
1 answer
106 views

QGIS how to use source query builder to only show the top X values of an attribute?

I have a layer containing polygons, and one of the attributes within it represents population growth. My goal is to filter the layer to display only the polygons with the highest 100 values of ...
VV_61's user avatar
  • 61
5 votes
2 answers
155 views

Give one symbol to several points in QGIS

Without editing original data, I want to display a single symbol in the center for points which has identical attributes. I have an area with nine basements. To each basement belong several points. I'...
Janko's user avatar
  • 149
0 votes
0 answers
32 views

Angle of wedge buffer not rendering on one point

I have been making pie charts with wedge buffers in QGIS for temporal controller. I just bumped into an issue with one point which completely ignores the azimuth angle for one color. The formula for ...
Nadka's user avatar
  • 41
2 votes
1 answer
30 views

Nested aggregate functions in print layout

I have 3 layers on map, State, County, City. I'm trying to create an Atlas based print layout by the State layer, that aggregates population totals in City layer, grouped by the county. I can easily ...
Seann Perry's user avatar
0 votes
0 answers
51 views

Select points and move points into center of polygons based on common field attributes using QGIS

I have two vector files: Points and Polygon in shapefile format. I need to know how many points lie outside the boundary of the polygons. And how many are located inside each polygon. After that, I ...
Shabani Magawila's user avatar
2 votes
1 answer
34 views

Symbolize only the attribute with a whole number out of a set of decimal numbers

I have a point shapefile of a river network with a point every 100m along the river with the distance to its estuary. The attribute is always a real number like this: 0.0, 0.1, 0.2, 0.3, 0.4, ... ,1.0,...
Richard's user avatar
  • 21
0 votes
1 answer
36 views

Editing 'expression' used in creating Field with 'field calculator'

I have created a new field 'COROAD' using field calculator and now I want to edit the expression. I cannot find a way to view the expression and edit it.
ujjwal basnet's user avatar
3 votes
2 answers
110 views

Rank labels of features by size with an expression in QGIS

There is a layer ne_10m_geography_marine_polys with labels for various maritime features. Of course, features are different by size (oceans and straits, for example), so it needed to be different ...
GeoEth's user avatar
  • 327
1 vote
1 answer
45 views

Calculating values from two rasters using QGIS Raster Calculator

In QGIS I'm trying to write an expression in the Raster Calculator, but I have failed so far. It should go like this: R1 and R1 are input rasters, RN is output raster. if R1=0, OR R2=0, then RN=0 if ...
Elenica's user avatar
  • 41
2 votes
1 answer
55 views

Selecting duplicate IDs in QGIS

I have a .csv file in QGIS with a list of water meters and their associated property IDs. Some property IDs have >1 water meter. I want to run a selection query to find all the duplicate property ...
Mow's user avatar
  • 165
0 votes
2 answers
27 views

Selecting Features Based on Expression on QGIS Attribute Table - Help with Code

I want to select features which contain the word 'workings' within the field called Sample_Comments within my CSV file. I have opened the attribute table and clicked on select features using an ...
Antyant's user avatar
  • 237
2 votes
1 answer
61 views

Calculating the length of lines in atlas mode

I have created an atlas that shows polygons (parcels) with respective lines (pipes). My task now is to display the length of the pipes for each parcel. The map looks somewhat like this (black=parcel, ...
ibdmn's user avatar
  • 181
4 votes
1 answer
76 views

QGIS - expression join attrributes by location

I'd like to sum up values from a point layer in my polygon layer from points lying within the polygon. I only found it with the processing toolbox, but that creates a new layer. But I just want to ...
Jonathan's user avatar
1 vote
2 answers
80 views

Using raster_value(layer,band,point) function in PyQGIS

I have successfully used the raster_value(layer,band,point) function as an expression in the field calculator GUI of QGIS. However, I am struggling to use the expression in PyQGIS. So far, my code ...
Hans Baumann's user avatar
2 votes
1 answer
92 views

QGIS expression with overlay_nearest and filter condition: problem with first feature

There seems to be a strange behaviour using QGIS expressions overlay_nearest() function with filter condition. The problem can be reduced to this minimal reproducible example (Geopackage with random ...
Babel's user avatar
  • 63.1k
4 votes
2 answers
84 views

Find closest line with same name in layer

Using QGIS 3.30, I have a (line) layer of streams, each with a name attribute. I am looking for a QGIS expression to find the distance to the nearest stream with the same name, or NULL if there is ...
Tom Brennan's user avatar
  • 2,440
0 votes
1 answer
37 views

Graduated symbology: How to classify based on two similar values? [closed]

I originally had two polygon layers (states) which contained the value 'power' per state. I merged those two layers into a new one, so that I can apply a homogenous graduated symbology with a color ...
Marx-GIS's user avatar
2 votes
3 answers
131 views

Setting a complex default value in QGIS 3.30 that does not update automatically

I'm currently using QGIS 3.30 and I'm trying to set a default value for a field based on multiple other fields, without having the default value update automatically whenever an attribute of the ...
MartinMap's user avatar
  • 8,196
4 votes
0 answers
65 views

QGIS expression to round to nearest 0.05

I'd like to have an expression that would round to the nearest 0.05. Can QGIS do this? For example, if the real number was 1.4378, the label would read "1.45". Or, if the real number was 1....
GISKon's user avatar
  • 49
0 votes
1 answer
41 views

QGIS field calcuator expression distance between centroid and point feature of another layer

I look for an expression in QGIS field calculator, that calculates the distance between the centroid (red dot) of polygones (red polygones) of layer 1 and the nearest (point-) feature of layer 2 (...
Mat Thias's user avatar
4 votes
1 answer
77 views

Automatic change geometry of a PointZ

Is there a way to create an action or a process that updates the Z value in the geometry column of a point layer when a point or multiple points are moved or added/created? Currently, I can do this ...
Ivan Marjanović's user avatar
1 vote
1 answer
79 views

Join attributes from point layer to overlapping polygon layer in a one-to-one relationship in QGIS

I have a polygon layer and a point layer. I want to get the attributes from the point layer and join them to the polygon layer in a one-to-one relationship. This is normally easily done with the Join ...
Mow's user avatar
  • 165
3 votes
1 answer
140 views

QGIS expression for features of two different layers intersecting to a certain percentage

I am looking for a QGIS expression in Field Calculator that delivers the values "good", "medium" and "bad", depending on the percentage that the geometry of features in ...
Mat Thias's user avatar
4 votes
1 answer
165 views

Expression for calculating the longest edge of a polygon rectangle in QGIS

I want to be able to calculate the longest edge of a rectangle polygon to create an expression for a style. The styled rectangles will have variable orientations, widths and lengths. I want to use ...
Kat's user avatar
  • 161
3 votes
1 answer
156 views

Split a text string with each character as an element of an array with QGIS expressions and regular expressions

I want to use QGIS expressions to split up a text string to an array with each element representing one character of the input's string, like: input: mytext -> ouput: [ 'm', 'y', 't', 'e', 'x', 't' ...
Babel's user avatar
  • 63.1k
5 votes
2 answers
132 views

Create line-type symbology perpendicular to a segment in QGIS

I want to create a symbology (line type) for a point layer in QGIS. This line must be perpendicular to the segments of a polygon. I attach an image: To do this I entered an expression in the rotation ...
Ma6matto's user avatar
1 vote
1 answer
88 views

Creating arrow effect using QGIS geometry generator

In another answer, there was a QGIS screenshot posted that shows lines created by geometry generator, connecting points in a hierarchical order. As a follow up question (see comment): Could you ...
Babel's user avatar
  • 63.1k
5 votes
1 answer
224 views

Calculating the day of the year with QGIS expressions

At QGIS 3.28.6 I have an attribute table containing a datetime field from which I need to populate an integer field that will contain the day of year (for example, 2/1/2018 would output to 32). Using ...
Stu Smith's user avatar
  • 7,940
4 votes
1 answer
104 views

Drawing line to the centroid of the concave hull composed by the set of each group of points within the same polygon

I am using the following Geometry Generator expression with which, for each point geometry, I draw a line to the centroid of the polygon the point is within: make_line ( $geometry, ...
Ingrid Ingravida's user avatar
3 votes
1 answer
154 views

Filtering maximum and minimum length in QGIS Attribute table

My Dataset contains the field "length" with numbers from 1 to 100. I just want to filter data which are greater than 50 or which are less than 50. I just use the formula: "Length" &...
Bruno B's user avatar
  • 767
2 votes
2 answers
87 views

Avoid empty lines in QGIS labels

I´m new to QGIS yet very exited of the learning curve and automatisms it provides. But at some point i dont manage to work around a problem. I want to label a vector layer with differnt attributes in ...
Toby's user avatar
  • 95
2 votes
1 answer
92 views

QGIS expression selecting features intersecting single buffer that has certain distance to the buffered feature

I am looking for an expression in QGIS that allows me to select polygon features (layer 1, red polygons), that intersect more than 50 percent of the buffer ring around a point feature of another layer ...
Mat Thias's user avatar
2 votes
1 answer
63 views

Field name not working in QGIS Modeler expression?

Why does the Field Calculator expression using field name work in the Attribute table but not in the QGIS Modeler?
Zeinab J. Jaber's user avatar
1 vote
0 answers
23 views

Expanding QGIS mask Plugin query

When I select a polygon and I apply the QGIS plug-in mask to it then a buffer is created around the polygon. The plug-in does this with the following expression in my case: in_mask(31370) Can I ...
Filip Lasseel Million paradise's user avatar
0 votes
2 answers
26 views

Categorise by week number of each year in ArcGIS Pro

I am new to ArcGIS Pro, and I would like to have a categorised symbology based on the year and week number of the year in question. For ex: 2022: Week 1 2022: Week 2 2022: Week 3 ... 2023: Week 1 ... ...
Inès Moreno's user avatar
1 vote
1 answer
47 views

QGIS - Automatic filling of the attribute table with an expression - continued

In the previous question, this is the link: QGIS automatic fill of the attribute table by expression I got help from a colleague and solved the problem of automatic fill of attributes and the code ...
sttipa's user avatar
  • 95
1 vote
1 answer
73 views

Dynamic text on title decorations

I am attempting to display in QGIS a numerical value taken from the attribute table of a particular scene and display it in the top right corner of the project layer. So far I have been successful in ...
George McCarthy's user avatar
5 votes
2 answers
214 views

QGIS automatic fill of the attribute table by expression

I have a line layer and in the attribute list the "Name" column, which can be, for example, 'V1','V2',....'V1-2','V1-2-3',... in I'm trying to put an expression in the next column that is ...
sttipa's user avatar
  • 95

1
2 3 4 5
19