Skip to main content

Questions tagged [aggregation]

To combine data into larger units. For example a group of points to a polygon, or political subdivisions (provinces) to larger entities (country).

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

Fetch multiple fields in relation_aggregate expression

In the QGIS 3.34+ expression builder, how could one use the expression parameter in the relation_aggregate to fetch multiple fields? E.g.: relation_aggregate( relation:= 'my_relation', ...
swiss_knight's user avatar
  • 10.4k
1 vote
1 answer
48 views

What is the right way to dissolve vector features in GRASS GIS on attribute values of one column summarizing or averaging others?

The line product of v.overlay contains a column with zones number and a stack of other attributes. What I want: Dissolve features (lines) on attribute column that contains zones number. Other ...
Nikolay Yasinskiy's user avatar
2 votes
1 answer
62 views

Aggregating points into polylines, sorted by timestamp using GeoPandas/Python

I have a geodataframe that contains positions (point geometries). For each position, we know the individual's id (id_individ), DOY (doy), year (année) and timestamp. I want to aggregate the ...
fab's user avatar
  • 48
2 votes
1 answer
129 views

QGIS Field Calculator - Aggregating and Calculating Ratios Based on Y-coordinate

I am trying to use the QGIS Field Calculator to calculate the sum of a specific attribute ('demo_field') for features in a layer to the sum of the same attribute for features that share the same y-...
unknown123's user avatar
4 votes
1 answer
84 views

Error using aggregate funtions in QGIS Geometry by Expression tool

I am encountering an issue while trying to use the make_line function along with geometries_to_array in the Geometry by Expression tool in QGIS. The expression I'm using is as follows: make_line( ...
unknown123's user avatar
3 votes
2 answers
190 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
  • 71.6k
1 vote
1 answer
67 views

QGIS multilevel query: aggregate values from different layers

QGIS 3.28.4. I have 3 shapefiles: polyline, street information (streetId, + streetInfos...) point, stake information (StakeId,streetId, + Stakeinfos.....) polyline, pannels information (PannelId, ...
ClaudeVer's user avatar
  • 630
3 votes
1 answer
77 views

What is the equivalent of native:aggregate() in QGIS Field Calculator?

I have two layers which I want to connect using the aggregate() function with the Field Calculator. I can do this using the processing tool: processing.run("native:aggregate", { 'INPUT' :...
eagleadmiral's user avatar
2 votes
0 answers
75 views

Why is my custom aggregate function not returning data in the order I've specified?

I have a polygon layer where many features intersect each other. I want to flatten these overlaps and pick out attribute values according to a custom order. To do this, I've been using QGIS's Union ...
dericke's user avatar
  • 992
0 votes
0 answers
52 views

ArcGIS Pro: Aggregate Polygon using Aggregate Field not honoured

The aim For cartographic purposes, certain features have to be generalized depending on the used scale. One step in this workflow is the aggregate polygons based on a category. The problem Using ...
MarcM's user avatar
  • 1,156
0 votes
0 answers
58 views

Expression works in one QGIS project, but not another

I have an expression in a Print Layout that populates a label with an attribute, based on which polygons are selected in map view. In the QGIS project that I made, it works perfectly. I tried copying ...
Winet's user avatar
  • 34
2 votes
4 answers
248 views

Aggregate entities by single value distributed in two fields - QGIS

I have a polyline layer with unique value ("loop A"; "loop B", etc.) distributed between 2 fields just like this: ID Field 1 Field 2 1 Loop A NULL 2 Loop A Loop B 3 Loop C Loop ...
Arthur's user avatar
  • 893
0 votes
0 answers
25 views

Cover area with point clusters bounds

Suppose, I have an area covered with regular grid points. Points have some categorial attribute. I need to cover the area with polygons corresponding to the value of this attribute (it is like bounds ...
PrintScreenSys's user avatar
1 vote
1 answer
297 views

Filling in attributes from a different layer in QGIS batch mode

I have a point layer with an X,Y field, containing the coordinates of each point separated by a comma. I'm trying to batch process r.water.outlet based on these X,Y values from a different layer, the ...
One's user avatar
  • 13
2 votes
1 answer
66 views

Make the aggregation function in the form menu more versatile for different projects?

I have expressions for a table field that has a map layer named as a data source file (building_ex.shp). I plan to save this setting as a style and use it in other projects, but in other projects the ...
Ivan M's user avatar
  • 303
1 vote
1 answer
295 views

Google Earth Engine: reduceRegion on multiple bands of daily aggregates

I found this hourly climate-dataset in the GEE catalog, which I want to utilize, to get the daily mean value for six different bands for the time between 2017 and 2022 based on one user-defined AOI (...
Jan Schweighöfer's user avatar
2 votes
2 answers
1k views

QGIS Field Calculator - adding up value from another layer

I need to sum values from one layer over another, in a 1-n relationship, based on an attribute. For example: Layer 1, Column to join name_1, Number column to enter value number_1; Layer 2, Column to ...
Jimmy Long's user avatar
0 votes
1 answer
177 views

Google Earth Engine update band values of aggregated image to just the values depicted in brackets in the band when data type is double

I am trying to aggregate the hansen forest loss data from a 30 x 30 m resoltuion to 1 km x 1 km resolution, where the value of the band is the proportion of the cell coverage. I feel like I am close ...
JT3ksc's user avatar
  • 3
4 votes
1 answer
84 views

Add polygon areas by roof orientation condition

I have a shapefile with building poligons and a raster file with the roof orientation (0-360º). I would like to assign the orientation to the building shapefile using QGIS. I converted the raster file ...
Ricardo Gomes's user avatar
5 votes
1 answer
275 views

Aggregating features values based on name attribute and geometry in QGIS

In QGIS 3.28.1 I have a map with many points (it does not contain polygons and lines), and there are some duplicate points on top of each other in the same geographic location, and I would like to ...
Abdullah Abdullrhman's user avatar
1 vote
1 answer
99 views

How to aggregate data according to week and get centroid of all points from that week?

I have a dataframe that looks like this: I want to extract data by aggregating the dates by week, and taking a sum of the observation counts like this: pd.DataFrame(data.groupby([pd.Grouper(key='...
user216048's user avatar
0 votes
0 answers
55 views

Aggregate using one field and retain corresponding attribute from another field in QGIS

This is a follow up question to my previous question Clip polygons to retain only top polygon in areas of overlap using QGIS and its answer. I have successfully aggregated my overlapping polygons to ...
agile-effect's user avatar
0 votes
0 answers
17 views

Aggregating values at building level data and getting values for block group level and by building type

I have data for the building level. I have classified these buildings into 5 different types. I need to aggregate the values of each building type and get data at the block group level. How can I do ...
Indu's user avatar
  • 1
2 votes
3 answers
285 views

Aggregating attributes from line to point using QGIS Expression

I have two feature classes: point and line. The purpose is to make geometrical relations between them. For instance, if points are on line then they automatically take attributes from a specific field ...
Levon Batoyan's user avatar
1 vote
1 answer
735 views

QGIS: intersect and filter in expression based filter

I am trying to filter as part of an intersection but can't work out where to add the filter. The intersection works fine intersects($geometry,aggregate('DSC_Roads','collect',$geometry)) But where can ...
GeorgeC's user avatar
  • 8,238
2 votes
1 answer
1k views

Aggregate (dissolve) polygons leaving internal lines - R

After dissolving polygons, some of the internal lines remain. It seem to be a problem common also to ther softwares (ArcGis and Qgis at least). The dissolve result is this: To dissolve using R, I'm ...
Oalvinegro's user avatar
0 votes
1 answer
61 views

How to aggregate total amount of precipitation from all cells within three seperate catchments?

Using ArcGIS Pro, I ran 4 different IDW interpolations (rasters) of rainfall measurements across 26 measurement stations (point features). I'm trying to now aggregate the total amount of precipitation ...
saltytooth's user avatar
0 votes
1 answer
67 views

WMS filter/aggregator for GetCapabilities

I have a GUI that consumes WMS layers. We want to be able to connect to multiple WMS services, but we don't want the users seeing all the available layers, just the ones that are relevant for our use ...
Almaniac's user avatar
2 votes
1 answer
280 views

Speeding up the process of aggregate function in QGIS

I'm conducting aggregate function in QGIS. But since the feature number is high, the process is very slow. Is there a way to speed up the calculation process? By using this function: sum("lengths&...
Eren E's user avatar
  • 143
4 votes
1 answer
920 views

Aggregating child features with parent attribute values in QGIS

I found this question when looking for my answer Referring to the parent layer with aggregate functions in QGIS I need to do something similar. In another words I need to join attributes by field ...
Roman Dostál's user avatar
2 votes
0 answers
136 views

Seeking PostGIS equivalent of Geopandas dissolve method

Suppose I have a multiline string feature that I have brought into PostgreSQL as a table called nld_table with the following columns: 'SystemID', 'SystemName', 'Location', 'Accred', 'NLD_Access', '...
gwydion93's user avatar
  • 1,903
1 vote
0 answers
172 views

PostGIS/PostgreSQL Heavy performance issues with SUM

Not sure if this is specific of GIS stuff or simply a SQL performance issue, but due to the nature of the issue and that I am working with H3 data types here it goes I have a query that runs very ...
SeekanDestroy's user avatar
0 votes
1 answer
320 views

Unexpected resolutions when aggregating rasters with raster package in R

I have a (near) global raster of elevation data in WGS84 with a resolution of 0.00893153 x 0.00893153. I am trying to aggregate it to a resolution of 0.166667 x 0.166667 with the following: fact = 0....
A. Bollans's user avatar
1 vote
0 answers
305 views

Resampling high resolution binary raster

I have a large, high resolution raster of binary data that I need to reproject and resample to align with a lower resolution dataset. Because the original data is binary, I need to aggregate using the ...
Jaken's user avatar
  • 93
3 votes
1 answer
324 views

Aggregating vector grid tiles to lower resolution in QGIS

I have a vector layer with grid tiles of 100x100 meters that contain data for each tile. I now would like to aggregate those tiles to a lower resolution (e.g. 200x200m, 1000x1000m), preferably in QGIS ...
Buglkrax's user avatar
1 vote
1 answer
136 views

Polygons with same geometry and bbox but can't be aggregated with GROUP BY

I'm trying to create a constraint unique on a geometry column to avoid duplicate ones, following https://dba.stackexchange.com/questions/299098/why-doesnt-my-unique-constraint-trigger/299107#299107 ...
Leehan's user avatar
  • 1,234
2 votes
0 answers
234 views

Aggregate interpolated data at county level with R

The raw data is at the state level and I would like to go down to the county level. To do this, I first adjusted the data to county level and then interpolated it. The raw data on state level looks ...
AriWhatElse's user avatar
2 votes
0 answers
169 views

Geometry simplification for large scale aggregations in GEE

When aggregating on a large scale in GEE, does geometry simplification matter? For example, when aggregating climate data on 30 km/pixel (e.g. NEX-GDDP), does it make computational sense to change ...
Basile's user avatar
  • 3,583
4 votes
1 answer
708 views

Aggregating features values based on distance in QGIS

In a polygon dataset, I try to summarize values of surrounding features based on a minimum distance if their area is too small (e.g. 500 square meters). For example, I have 3 polygons with 300, 250 ...
parallax's user avatar
  • 1,482
1 vote
0 answers
58 views

Aggregating data by zip code over time in QGIS

I have data that is at the zip code level and I am looking to be able to have that data aggregate over time with a temporal display of the map. Is there a way to do this using QGIS?
Zack's user avatar
  • 11
1 vote
1 answer
1k views

Get the sum of an attribute within a set radius for each row using GeoPandas

I have grid map that contains cells. Each cell is represented as a row in the dataframe, and each row contains the average population "pop" attribute. What I need is that for each of these ...
SS-Salt's user avatar
  • 139
1 vote
1 answer
352 views

Getting median value of attribute for duplicate polygons and dropping duplicates using GeoPandas

I have a DataFrame that resulted from spatially joining a digital elevation map with a square grid map. This unexpectedly resulted in duplicate rows where two rows will have the same "geometry&...
SS-Salt's user avatar
  • 139
1 vote
1 answer
92 views

Merging zipcodes based on population to create larger areas in QGIS

In QGIS I have a shapefile with small geographic areas (zipcodes) with population in each zipcode area. Currently the population per zipcode vary very much, some as low as 1 person living in them. I ...
Elias's user avatar
  • 11
1 vote
1 answer
628 views

Merging touching polygons in same layer using ArcMap [duplicate]

I have a shapefile consisting of many polygons, and I would like to merge them when they touch each other (see red lines below). I've been trying quite a few tools in ArcMap 10.7 such as Dissolve, ...
Beardedant's user avatar
1 vote
1 answer
73 views

Why does aggregation of MODIS pixels not sum to 1?

I want to find the fractional cover of different tree species from MODIS (30 m resolution). I use R to stack, aggregate (1020 m resolution) and thereby find the fractional tree species cover for a ...
Thomas's user avatar
  • 925
0 votes
0 answers
275 views

Aggregating and calculating fractional vegetation cover from raster using R

I have some MODIS data on vegetation cover. It is at a 250 m resolution and I would like to aggregate the pixels on a 1 km scale, and at the same time calculate the fractional vegetation cover since I ...
Thomas's user avatar
  • 925
2 votes
2 answers
210 views

Dissolving linestrings by uniqe value in field using QGIS

I want to dissolve a line geometry by a unique value in the field "RoutenIDs". For example dissolve line 37 to 43 with value 27. Dissolve line 37-46 ... with value 1999 and so on. Is there a ...
Marc's user avatar
  • 29
0 votes
1 answer
44 views

Creating polygon which outlines many smaller polygons to show their extent using ArcMap

I am looking at a wildfire, and I need to display the wildfire footprint, however all I have is a raster of classes, I converted that raster to a polygon for values that show low to high burn severity,...
Ryan Lima's user avatar
0 votes
0 answers
56 views

Customizing factor in aggregate tool in ArcMap

I have a raster of 30m cell size, with either value 0 or 1. I try to aggregate this into a 1000m cell size. I can then see the proportion of '1's, in a 1000m cell size raster. But the Aggregate tool ...
Beardedant's user avatar
3 votes
1 answer
174 views

Aggregating MultiPoints to MultiPoint output using ST_Collect

I have a geometry column that stores MultiPoints. How can I aggregate MultiPoints having another MultiPoint as a result, not a GeometryCollection? select st_collect(geom), id from my_table group by id ...
Lokomotywa's user avatar
  • 1,181