Questions tagged [expression]

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

Filter by
Sorted by
Tagged with
0 votes
1 answer
40 views

How to fulfill condition from an enum input?

The condition that I do not do does not work if (@step = '0.5m',"VALUE" like '%.1','')
user avatar
  • 37
2 votes
0 answers
42 views

Create lines between points layer and line layer (but not the nearest)

I'd like to create lines between a point layer and a line layer, but not in shortest line function in geometry generator. I using this command in geometry generator: make_line ( $geometry, ...
user avatar
  • 21
0 votes
1 answer
26 views

Using filter expression in QGIS Modeler

Is there a way to load a saved filter expression (.qqf or .json) in QGIS Modeler and use it in the Feature filter?
user avatar
6 votes
1 answer
168 views

QGIS - Connection Lines using geometry generator between 2 layers in a relation N-1

I would like to know if there is any way to generate a connecting line between 2 points layers (blocks-points representing a watershed, concpoints-points representing the concentration location of the ...
user avatar
4 votes
1 answer
103 views

What is meant by 'current feature' when using the field calculator or expression builder in QGIS?

I am curious about field calculator and expression builder language in QGIS. For example, $area returns the area of the 'current feature'. Does 'current feature' refer to all features of a shapefile ...
user avatar
  • 41
2 votes
1 answer
19 views

QGIS misidentifying fields attribute type

In trying to build a simple expression to sum data into clusters I've used the following statement: sum('MTO heat map_Total','MTO heat map_Grouping') The value 'MTO heat map_Total' is an integer ...
user avatar
3 votes
1 answer
111 views

Using QGIS field calculator to create an 'fid' column according to a value from another column

I have a shapefile with 1,800 rows. I need to edit this file as follow: Row_name is from 1 to 45 Col is from 1 to 39 fid should be from 1 to 1800 in order (This is the new field I need to create). I ...
user avatar
0 votes
1 answer
14 views

How can I use the values of a GDB coded value domain in QGIS

In a GDB the attribute size contains a coded value domain {0: small, 1:medium, 2: big}. How can I access the value of a domain of a GDB in QGIS? I want to use the value in an expression or a field ...
user avatar
  • 157
1 vote
1 answer
29 views

QGIS Print Layout expression for selected features in project

I have a selected feature in the project that is symbolised differently. I can see it in the print layout, but the is_selected expression returns a false. I need to label only this feature in a text ...
user avatar
2 votes
1 answer
32 views

Categorizing field and summing attributes for label in QGIS

Using QGIS, my goal is to group "FSA"s (postal code or zip code ordering) into larger regions, and have data labels labelling these larger regions. The labels themselves would be the sum of ...
user avatar
0 votes
0 answers
12 views

Advanced version of zoom and property functions in MapBox-GL JS

I am using the "zoom and property" functions very well. Basically, it returns values based on zoom level and attributes' value For my special project, I needed a function that reads specific ...
user avatar
  • 942
1 vote
1 answer
35 views

How to remove null attributes with table row from popup using Arcade expression in ArcGIS Portal

I am using the HTML code to configure the popup <font size="2"> <table border="1"> <tbody> <tr> <td><b><font color="#000000">...
user avatar
-1 votes
0 answers
23 views

Translating ArcGIS expression to QGIS expression [duplicate]

Can you help me translate the following ArcGIS raster calculator expression to a QGIS 3.22.5 expression? Con("raster.tif" < 0.004, 0.004, "raster.tif")
user avatar
1 vote
0 answers
44 views

QGIS Add dynamic text in layout from selected feature's attributes

I have a layer called ERVEN with property details from which I select a property/ies. I create an automatic layout from a plugin. In the layout, I need to add dynamic text. The text will be certain ...
user avatar
2 votes
1 answer
18 views

How to set default attribute values on a new line based on overlay_touches/nearest for start_point and end_point

I have 2 tables/layers: A Point table called "Chambers Used" with names in a field called "Chamber Identifier" A LineString table called "Ducts Used" including fields &...
user avatar
2 votes
1 answer
29 views

"array_agg" function for label in atlas by inserting an expression in QGIS

I want to put a label on the atlas, to know which points correspond to each student for a data survey. That is to show me for each student a list like this --> [252, 254, 271] In the attributes ...
user avatar
  • 23
0 votes
0 answers
29 views

Writing ArcGIS Online symbology expression using if else

Can you help me with the if else syntax for an online symbology expression in ArcGIS Online? My code is if ($feature.kayam<= 0 < 10 ){ return "rgb(103, 0, 31)"; } else if ($...
user avatar
4 votes
1 answer
44 views

What is the correct expression syntax to autofill output extent while batch processing in QGIS?

In QGIS (3.2), I'm using the Rasterize (vector to raster) in batch mode. This tool requires an output extent be set for each layer (leaving this parameter blank is not acceptable). I would like to ...
user avatar
0 votes
0 answers
28 views

Unable to calculate aggregate function on virtual fields using QGIS 3.22

I'm experimenting with virtual fields and relations on QGIS 3.22. but I'm getting something wrong. I have a point layer with a related maintenance table. A virtual relation aggregate field named "...
user avatar
  • 2,035
2 votes
2 answers
66 views

Variable for symbol width in QGIS expressions?

Using QGIS 3.22.1. I have straight lines connecting two points. These lines are stored in two separate layers, one layer for each direction. I am using a graduated size renderer to display these lines....
user avatar
1 vote
3 answers
49 views

How to prevent '+' operator from concatenating rather than summing [closed]

I am trying to sum two fields and am using the expression below. "Q1 answer" + "Q2 answer" This expression is concatenating the answer to '32' when the answer should be '5' (3 ...
user avatar
2 votes
1 answer
36 views

Is there an expression to indicate the name of the layer on which the shape lies?

I have a question if there is an expression to indicate the name of the layer on which the shape lies. Exactly what I mean: I have a map created based on Open Street Map regarding public facilities ...
user avatar
  • 53
0 votes
1 answer
69 views

QGIS Regex expression label

I'm trying to use regex expression to label my layer in order to show the parcel number. Here is some examples of what i'm looking for : From this "53042A0027/00M002", to "A27M/2" ...
user avatar
2 votes
2 answers
111 views

Removing duplicates from data attribute table by expression in QGIS

I have some duplicates in my data attribute table like you can see below: I used the following formula count(1, "Site ID") > 1 based on this question: Identifying duplicate attributes ...
user avatar
  • 3,546
2 votes
2 answers
71 views

QGIS Field calculator cumulative sum with non-numerical index

I need to create an attribute with cumulative sum of another attribute. The values are sorted by a string attribute. I just found posts that involved the numerical id of the features. I've tried to ...
user avatar
6 votes
1 answer
63 views

QGIS point layer: Select first point in each category

I have a point shapefile layer with several thousand points. Each record has a timestamp field and another field which defines a category to which that record belongs. There are about 200 different ...
user avatar
  • 373
2 votes
1 answer
41 views

How can I select features in the attribute table of a layer in QGIS from a list? [closed]

I have ~5000 features in a layer in QGIS. Each feature has a unique ID. I have a list of ~800 features (with corresponding IDs) I would like to select and remove from the layer. Which expression ...
user avatar
1 vote
0 answers
46 views

Match label color to polygon color

I have a polygon layer in which I'm labelling each polygon on the map. I am trying to figure out how to make the label colour match that of the underlying polygon (with a white buffer around the label ...
user avatar
  • 869
2 votes
1 answer
57 views

Using LIKE with a Real field

Is it posible to use a wildcard in a field with real values? I am using QGIS. For example. I have a field with values from 0 to 10000, with increments of 10 metre, but would only like to display every ...
user avatar
3 votes
1 answer
86 views

QGIS Temporal controller: getting the current animation time (percentage elapsed of total animation duration) with expressions / variables

The question How can I get the current animation time of a Temporal Controller animation using expressions with QGIS 3.24? I guess I'm almost there (see below), but have trouble dividing a time ...
user avatar
  • 40.1k
4 votes
1 answer
69 views

Snap points to polygons based on attribute QGIS

I'd like to snap the points to the closest polygon (blocks) based on an attribute they share, this attribute is their suburb. I've tried by running the following expression: closest_point( ...
user avatar
  • 71
2 votes
0 answers
27 views

Snap points based on attribute QGIS

I'd like to snap the blue points to the nearest yellow point based on an attribute they share on QGIS, this attribute is their suburb, I've tried by using the tool "geometry by expression" ...
user avatar
  • 71
3 votes
2 answers
128 views

Replace all but coordinates from a WKT string, including closing bracket ')'

To get a list of coordinates from a polygon and remove unwanted parts from the resulting string, the following expression works fine to remove the string elements 'Polygon', spaces and opening ...
user avatar
  • 40.1k
2 votes
1 answer
69 views

Filtering in overlay_nearest

I am using QGIS 3.24, I have 2 polylines layers: First one is composed of 2 rivers, crossing. The two of them are named 1 and 2 Second one is composed of parallel lines form this rivers. 5 and 6 ...
user avatar
  • 29
6 votes
1 answer
70 views

Extracting part of string from two columns at once in QGIS

I would like to extract numbers from two columns at once because I have the situation you see below. regexp_substr(regexp_substr("Address L1", '(\\d*) ')("Address L2"), '(\\d*)') ...
user avatar
  • 3,546
5 votes
2 answers
86 views

QGIS defining the nth character where the label could be wrapped

I have the labels, which include a few of the same characters "/". Unfortunately, I cannot simply use the "Wrap on character" option, because it wraps everywhere where this ...
user avatar
  • 3,546
3 votes
0 answers
49 views

How to rotate labels with an expression in QGIS 3.x

I have a layer with lines, and I am trying to rotate some of their labels that are displayed at 270º to get them at 90º like the rest, but the expression is doing nothing. Even fixing the expression ...
user avatar
  • 333
3 votes
1 answer
36 views

Using overlay_nearest expression

I have a project in Qgis where I have 2 layers: 1. plot of land (in the project named as "lohko") and 2. observation. I have joined the id of the plot of land layer to the observation layer ...
user avatar
5 votes
3 answers
220 views

Calculate the distance between multiple points within a buffer in QGIS

I am very new to QGIS so please bear with me. Attached is an image of my QGIS project so far. In this, you have the pinkish points of the "Point_centers" layer and green points labeled "...
user avatar
5 votes
3 answers
230 views

QGIS - Is it possible to filter records by the current date?

Is it possible to filter the records of a layer in QGIS with the current date? The field I want to filter is a date-column and the layer is stored in a GeoPackage. The problem I see is that I can't ...
user avatar
  • 152
4 votes
1 answer
51 views

Exctract one record from duplicates values

I'd like to exctract only one record from duplicates records (for example in a field "test") using "exctract by expression" in qgis. Some records could be not duplicates, and ...
user avatar
  • 649
1 vote
1 answer
33 views

QGIS select values (strings) without any number

I would like to select the values which have no numbers in their string. For this purpose I used the following code: CASE WHEN regexp_match("Address L1", '^\\d*\\s?') THEN NULL ELSE &...
user avatar
  • 3,546
5 votes
1 answer
106 views

QGIS remove number from the string doesn't work as expected

I am fiddling with addresses, where I would like to remove the street number. So far I found some solutions leading to explain how to get rid of the numbers but from the right side of the string: ...
user avatar
  • 3,546
0 votes
0 answers
40 views

Raster calculator expression

I'm looking for raster calculator expression which includes the "STATISTICS_MEAN" value from the raster properties. How can I build the expression, that the value is automatically adapted? I ...
user avatar
  • 81
4 votes
1 answer
64 views

Fieldname as variable in with_variable returns value not the field

I want to use a field name as a variable inside the geometry generator, but it replaces the field name with the current value of the feature instead of taking the field name as the variable. ...
user avatar
4 votes
2 answers
168 views

Move points into center of polygons base on common field attributes using QGIS

I have a shapefile of points and polygons layers with a common field attribute "Parcel_No". Each of the points share a common unique "Parcel_No" with the polygons, but the points ...
user avatar
0 votes
0 answers
10 views

ArcGIS Online symbology expression

I have a feature service created in ArcGIS Online. The symbology is based off the field "RequestType", with four options 1. Trash Pick-Up Request 2. General Comment 3. Alert 4. Missing GIS ...
user avatar
2 votes
1 answer
44 views

Raster calculator expression which includes the "STATISTICS_MEAN" value from the raster properties

I'm looking for raster calculator expression which includes the "STATISTICS_MEAN" value from the raster properties. How can I build the expression, that the value is automatically adapted? I ...
user avatar
  • 81
0 votes
1 answer
83 views

Making expression to replace only street abbreviations and nothing else

I have two shapefiles and I want to join them based on address values. However, in the table of contents, there are some rows that provide street names along with street abbreviations, while some ...
user avatar
1 vote
0 answers
24 views

ArcGIS Online popup generated by expression does not display results unless a pie chart is added

Working in AGOL, I've written a conditional expression that generates an output for my popup based on one of the layers in my map. However, the output does not display unless I also add a pie chart to ...
user avatar

1
2 3 4 5
15