Skip to main content

Questions tagged [aggregate]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
1 vote
0 answers
35 views

PostGIS: Left Join (ST_intersects) lead to multiple counts (not distinct) in aggregate function [duplicate]

I have a query with 2 left joints (ON ST_Within, ON ST_Intersects).The second left join (ST_Intersects) in the example below causes multiple counts of the point_table in the aggregate function (SUM). ...
teamspeakuser's user avatar
0 votes
0 answers
31 views

QGIS - calculate area of intersecting features or features within Atlas_geometry

I have a layout controlled by atlas by parcel numbers. Within the parcel numbers are geometries from another layer "IAN". I would like to sum the areas of the geometries within the ...
Marek's user avatar
  • 537
2 votes
1 answer
137 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
  • 405
2 votes
1 answer
49 views

Aggregate/group points by value, and label aggregated point with aggregate expression (QGIS)

Problem Statement I have a layer of multiple points, and I am trying to: Aggregate/group the points by their attribute values, so that one point is drawn for each group of points with matching ...
MarcusR's user avatar
  • 135
0 votes
0 answers
31 views

Attribute values look the same but Query Tool says they are different

I have used a 28.1.22.3. Aggregate tool over a table of attributes of a shapefile and then made a Join of this Aggregated layer to the original layer based on the Group_By attribute. This was ...
Kamila's user avatar
  • 1
0 votes
0 answers
26 views

How to create a field with a list of neighboring residential lots in QGIS?

I need to create a field with a list containing the 'name' information of the geometries that intersect each of the existing geometries. They are residential lots, and I need to list the adjacent ones....
Victor Diniz's user avatar
1 vote
0 answers
43 views

Can I halt QGIS doing calculations while I work on the code?

I have a project that quite heavily relies on aggregate() functions and I can live with that it takes QGIS a quarter to do all the calculations. But QGIS wants to redo all the calculations nomatter ...
Morten's user avatar
  • 183
7 votes
2 answers
180 views

QGIS functions: aggregate and array_foreach not working for vertices

I have two layers as the whole project in EPSG:4326: polygon layer of countries linestring layer of routes I want to concatenate the country names (those are stored in "name" attribute) ...
Kluuboo's user avatar
  • 71
4 votes
1 answer
255 views

Dissolve consecutive touching lines segments where common value in QGIS

I am trying to dissolve the grey line layer where the field "dis" ( "anzahl" || '-' || "heizlast") has the same value and the segments are touching ( end_point touches ...
Denis Crîlov's user avatar
3 votes
1 answer
88 views

Counting points from layer at map extent with QGIS expression

I want to create an expression in the QGIS 3.28 dashboard layer that counts points on a specific point_layer and with a specific value that is displayed in the current map_extent view aggregate( ...
Rii Pii's user avatar
  • 464
5 votes
2 answers
272 views

QGIS Aggregate expression Function with GroupBy argument

I have a Layer "SplitNEW" which is grouped by the "group"-Column as follow: 0-RED , 1-GREEN , 3-BLUE. The 3 Lines where previous split. Each Row in attribute table stands for an ...
Denis Crîlov's user avatar
1 vote
1 answer
145 views

Error with array_foreach when using together with aggregate in QGIS expression [closed]

I want to use array_foreach functionality. But it does not seems to work when used in an aggregate function. This intermediate test ( array predefined, instead of array generated by another aggregate),...
ClaudeVer's user avatar
  • 630
0 votes
0 answers
40 views

Merging multiple records into 1 record, group by field ‘group’

I have a point geometry file (GeoPackage) which I am working with in QGIS. It contains tens of thousands of records which discuss the topic 'Mineral occurrences'. Within this point file exist ...
FlyHi's user avatar
  • 29
0 votes
0 answers
29 views

How to average daily precipitation values into weekly sum in R

I would like to sum the daily precipitation values into a weekly format such that the raster layers names would be the first day of the weekly sum. > print(prec_brick_ES) class : RasterBrick ...
Shunrei's user avatar
  • 41
2 votes
1 answer
113 views

Merging multiple records into 1 record, group by field 'group'

I have a point geometry file (GeoPackage) which I am working with in QGIS. It contains tens of thousands of records which discuss the topic 'Mineral occurrences'. Within this point file exist ...
FlyHi's user avatar
  • 29
1 vote
1 answer
64 views

Summarize points by tag over each atlas feature with QGIS composer

I'm trying to represent in every single atlas feature the basin for several streams. Each basin can have one or more stations. The data to plot is a point vector, with columns for "data" and ...
Pablo Xesteira's user avatar
1 vote
1 answer
95 views

Aggregate field in QGIS

I have question about aggregate values from attribute table. I have something like this: and I'd like want to get something like this: I use aggregate tool but without good results.
thorian's user avatar
  • 23
1 vote
1 answer
76 views

QGIS 3. Point Cluster rendering but with categorization?

Is there a way to obtain the same spatial rendering as what QGIS 3 allows with Point Cluster symbology (spatially close points clustered in a unique symbol) but using an attribute based categorization?...
Henème's user avatar
  • 33
1 vote
1 answer
189 views

Aggregate a simple features collection in R by a factor variable

I'm trying to aggregate a simple features collection using a group variable that is a factor. Below is a simple example. library(sf) #> Warning: package 'sf' was built under R version 4.2.3 #> ...
RichPatter's user avatar
0 votes
0 answers
22 views

Generating new polygons based on sum of values

I am working with QGIS, and I have created the styled density map with the hexagons to calculate pop figures within these. The pop field is displayed inside each polygon. I now want to create new ...
A_Y's user avatar
  • 91
1 vote
1 answer
69 views

QGIS atlas print composer : aggregate (bigger overlap)

With QGIS 3.30, In the composer interface, I generate an atlas. My iteration layer is polygonal layer (platforms). I added a text element to automatically get by spatial intersection the 'parcel_id' ...
user35117's user avatar
  • 939
1 vote
0 answers
72 views

QGIS aggregate intersects points in polygon by filtering values

I have in QGIS 3.28 points and polygon layer. I want to create virtual field that SUM on the point layer all the specific values the points intersecting in the polygon that are filtered according to ...
Rii Pii's user avatar
  • 464
4 votes
1 answer
103 views

Aggregate expression seems to be calculating the first value only

I have 2 vector layers: a point layer (named Messedatei, with 5 columns named field_1-5) and a line layer (each feature is build with only 2 vertex points). I want to calculate the 'z value' of a ...
Szymon Piotr Jerzy Czwart's user avatar
1 vote
1 answer
56 views

Field Expression to Count Ducts that are Intersecting the Midpoint of a Routeline in QGIS

I am trying to make my field in a Routeline to automatically count all the ducts that passed throught it. I was able to come up with this code. aggregate(layer:='Duct', aggregate:='count', ...
Suzuha Amane's user avatar
1 vote
0 answers
96 views

Sorting based on aggregate in QGIS Atlas layout

In an Atlas layout, I can in a text field or table with no problem sum the attribute SBT for features being inside the current atlas feature by using this aggregate function: aggregate( layer:='...
Morten's user avatar
  • 183
3 votes
1 answer
69 views

Select text field associated with maximum numeric field during QGIS aggregate process

I have a site layer and a grid layer and want to add attributes to the site layer which include a new area (the intersection) and the grid reference (a text field) associated with the maximum ...
benj's user avatar
  • 145
2 votes
2 answers
153 views

QGIS - Aggregate geometries without including the current feature

I'm using this expression: aggregate( layer:= 'Dissolved', aggregate:='concatenate', expression:= to_string(predicted), concatenator:=',', filter:=intersects($geometry, geometry(@parent))) ...
Giene's user avatar
  • 701
2 votes
1 answer
161 views

Counting polygons with multiple filters in QGIS

I am using the aggregate expression in QGIS to count how often my polygon name appears in another point layer. The 'Polygon_zone_name' exists on both my polygon layer and my points layer, I can ...
Hibernian3's user avatar
2 votes
1 answer
46 views

Retreiving info from another layer

I have two shapefiles: street (polyline) listing of all streets in one village with fields 'streetId', 'Streetlength' (virtual field) streetpanel listing of all panels displaying street name with ...
ClaudeVer's user avatar
  • 630
1 vote
1 answer
187 views

In "Aggregate" tool, concatenate function and \n delimiter doesn't result in break line

I am encountering problems with the 'Aggregate' tool and the 'concatenate' function with the '\n' delimiter. The process is not resulting in a line break as expected. Please see the screenshot of the ...
Jean's user avatar
  • 21
5 votes
2 answers
242 views

QGIS aggregate - filter by newest date

i have two one-to-may related layers (relation name: tree_observation) parent: trees and child: obeservations. The trees should be revisited on a regular base and for each observation a new child ...
sn1ks's user avatar
  • 3,002
2 votes
1 answer
118 views

QGIS: Use layout name as variable in field calculator for referring to a specific column?

I want to do some calculations based on a column which has the same name as the layout name (Graugans in this example). To have less typing work, I thought about using the layout name as variable. But ...
Martin's user avatar
  • 299
2 votes
1 answer
123 views

Polygon neighbors in a shapefile in QGIS using aggregate not working

I'm using QGIS 3.28 I want to find the neighboring polygons for each polygon in my layer, which is formed of polygons. Having searched for available solutions, I've come up with this: https://...
Iyad's user avatar
  • 67
1 vote
0 answers
154 views

QGIS sum attribute values of overlapping line segments

This is sort of follow-up to this thread. Not sure how I got it working a year ago, but now I'm across the same issue again. Here is a clean dataset which I believe is correct. It contains overlapping ...
edge's user avatar
  • 229
1 vote
1 answer
750 views

Aggregate raster in R and get count of contributing pixels

I have a raster with some NULL values. I need to aggregate the raster to a coarser one, and get a count of the pixels that are being aggregated (for every output pixel), excluding the NULLs. I'm ...
jaykay's user avatar
  • 31
0 votes
1 answer
544 views

Aggregate raster using gaussian smoothing as a custom function/Units of the sigma

I am trying to aggregate a raster using a custom function and the terra package. For the custom function I am using a Gaussian smoothing. When I try to run the aggregate function I am getting this ...
Nikos's user avatar
  • 1,033
5 votes
1 answer
173 views

Summing areas of polygon features listed in field using array_foreach function in QGIS

In QGIS, I have a vector layer with a field listing the names of several polygons features. I want to calculate the sum of the areas of the polygons in this list, using Field Calculator and displaying ...
Maxime Riou's user avatar
0 votes
1 answer
744 views

GeoPandas centroids based on field, while keeping aggregated values

I have a shapefile containing 85.000 points representing houses. I want to create a new shapefile containing the centroid of each subset of houses with the same postal code. This centroids file should ...
Maarten 's user avatar
3 votes
0 answers
391 views

Aggregate attribute value of polygon within geometry of another polygon layer QGIS

I have two layers, both polygons. One layer includes watersheds as polygons, each watershed is it's own attribute row. The second layer is a segmented stream network, each segment is it's own ...
vermicellion's user avatar
0 votes
1 answer
402 views

Aggregating points within certain distance and keeping all points info using QGIS

I have a map with many duplicate points and I want to combine those points together into one, based on the name and geographical location (10 meters), is there a way to do this with QGIS, given that I ...
Abdullah Abdullrhman's user avatar
1 vote
0 answers
41 views

Finding polygon neighbors using intersect function with added conditions

Using aggregate() in field calculator, I tried to find neighboring polygons. The polygons have a field type with two values: new and old. I want to find neighbors of the type old. Hence, I tried the ...
linda theres's user avatar
2 votes
1 answer
77 views

Different area values in aggregate function

In QGIS 3.22.8 the aggregate function used in text field shows planar area values instead of spherical. It happens in both the Print Layout and the Report. How can I get the spherical values of the ...
flisior's user avatar
  • 47
1 vote
1 answer
643 views

QGIS aggregate expression to filter selected features in 2nd layer

I´m working with two layers in QGIS: First one with point geometries representing water quality sampling places (LAYER A). The second is a spreadsheet (no geometries) that contains pollution values ...
janavaarro's user avatar
2 votes
2 answers
161 views

How to aggregate street lines using value filter

I have a shapefile of a service done on a street. This service has a sequence of execution and whether or not I should run on that street (blue and red). At each corner of the street I'm working on, I ...
Jos David de Souza Santos Jnio's user avatar
1 vote
0 answers
32 views

Neighboring zones using a condition (expression)

We have a census tract layer which contains the total number of dwellings 'V_tot'. We need to group the census zones that intersect each other where their sum is in the range of greater than 150 and ...
GIRMAR's user avatar
  • 11
1 vote
0 answers
194 views

QGIS: 'Incorrect parameter value for AGGREGATES' when using Aggregate in a Python-Processing-Script

I am currently working on a QGIS-Python-Processing-Script that creates an automated street register for a printed city map as a CSV file. In that context I want to give the user the option to choose ...
enrico_pallazzo's user avatar
1 vote
1 answer
123 views

Problem using aggregate function to do a 1:m join

I am using QGIS, version 3.24.0. I have a shapefile called "Map_CorrectionDEF", uniquely identify by fields "GID" and "unitcode". It is a grid cell, in which the field &...
OgeiD's user avatar
  • 566
0 votes
1 answer
72 views

Connect polygons with gap without dissolve intersected polygons in ArcMap

I want to close gaps between polygons that are not intersecting and without a barrier in between (like streets). Its possible by "Aggregate Polygons", but this tool is dissovling all ...
Saelon's user avatar
  • 65
1 vote
0 answers
54 views

How to print numbers per categories of a layer in QGIS Atlas generator?

What I want to achieve is based pretty much on this solution but with the sum and a category text per category. So instead of writing [% aggregate( 'layer','sum',"category_txt", filter:=&...
maxwhere's user avatar
  • 1,158
0 votes
0 answers
208 views

Getting count of points in grid using Google Earth Engine JavaScript API

I am using Google Earth Engine to map attacks between armed groups in Colombia. I added a grid to the map and I want to get a count of attacks per 'dyad_name' per grid square. Among the many things I ...
Laura Roldan's user avatar