Questions tagged [aggregate]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
1 vote
1 answer
36 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 &...
user avatar
  • 445
0 votes
1 answer
25 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 ...
user avatar
  • 37
1 vote
0 answers
24 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:=&...
user avatar
  • 922
0 votes
0 answers
56 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 ...
user avatar
4 votes
1 answer
56 views

Accessing aggregate functions on another layer in QGIS

I am using QGIS where I have: Layer 1 STREETS : lines each of one representing a street (one line one street), with different fields, with a unique id called "Name" (string) Layer 2 STAKES :...
user avatar
  • 418
6 votes
1 answer
61 views

Setting delimiter/filter in the aggregate function from QgsVectorLayer

With PyQGIS I want to aggregate some fields in my layer. When I use: mylayer.aggregate(QgsAggregateCalculator.StringConcatenate, myField) Then I get a concatenated string without delimiter. So I ...
user avatar
  • 155
2 votes
1 answer
89 views

PyQGIS: Aggregate function used with field calculator

I'm using the following code with processing algorithm "Aggregate" to find neighbor polygons of some selected features in a polygon layer: from qgis.core import QgsProcessing from qgis.core ...
user avatar
  • 141
0 votes
0 answers
21 views

Fail to "Aggregate"

I tried to do "aggregate" for a vector layer. However, it was unsuccessful and I received a message in the log as follows: "impossible to combine geometries for "id_2" ". ...
user avatar
  • 61
1 vote
0 answers
57 views

Unable to aggregate line segments while summing values

I've a layer with multilines, overlapping to a various degrees. I need to merge/dissolve them "downwards" while summing their values for the overlapping segments. I made it to "Union&...
user avatar
  • 209
2 votes
0 answers
77 views

Can I resample a raster in R using "max" as function?

With a raster and a reference raster, I'd like to do something like this: # resample raster to ref_raster to match resolution/origin using max as aggregate raster = resample(raster, ref_raster, 'max') ...
user avatar
  • 1,209
2 votes
1 answer
62 views

QGIS List of two intersecting layers features inside Atlas

Learning to use aggregates. Need to know how I can list several streets inside my atlas with the condition that layer 1 (not controlling layer, only visualised and used for statistical purposes) and ...
user avatar
1 vote
0 answers
21 views

nodata leads to high pixel values after aggregation

I am working in QGIS with binary raster images and my task is to decrease the resolution from 0,1 to 5m. Problem is, I have several areas that were excluded with “no-data” beforehand. After ...
user avatar
  • 31
2 votes
1 answer
53 views

Identifying neighbouring polygons but field calculator preview and output are different

I'm really struggling trying to create a field which lists the neighbouring cells of my grid. I have a grid of 814 cells, and for most cells (i.e. the ones which are fully surrounded) there are eight ...
user avatar
0 votes
0 answers
23 views

Preserve NA areas in resampled raster

I got a raster image with 2m pixel size, there are some areas with value 1 (black) and roads with value NA (white): It is made from a rasterized shape: Now I resample my raster to 5 m pixels, the ...
user avatar
  • 99
0 votes
0 answers
94 views

Combine nearby points into single point with average location in ArcGIS Pro

I've added GPS waypoints to my ArcGIS Pro map using the GPX to Feature conversion. However, some points are clearly "duplicates" of the same location because they are so close together. (...
user avatar
3 votes
3 answers
154 views

Counting and merging features based on attribute field in QGIS

I have a shapefile with a number of features, each with a field called "region". I want to count the number of features corresponding to each region. Outputting a shapefile with one feature ...
user avatar
  • 313
2 votes
0 answers
41 views

Use aggregate to create a label from multiple shapefiles

I'm trying to fill one field of a line feature shapefile Cables (CAVI) with a default value that updates based on the start coordinate end the end one. The resulting field is a combination of the id ...
user avatar
  • 71
4 votes
1 answer
56 views

Aggregating isochrones with accessibility values in QGIS

I have created a series of isochrones for public transport, for the bus, tram and train, with a 5 and 10 minute walking range. Now I would like to aggregate these values to show which areas are most ...
user avatar
  • 361
3 votes
1 answer
89 views

Area of intercepted geometry

I have a polygon layer and a point layer (which was created by obtaining the centroid of each polygon in the polygon layer). I have tried to use the aggregate expression to automatically fill a field ...
user avatar
  • 61
0 votes
0 answers
17 views

Aggregating point data to areal data proving a count in the end

I want to compute a MULTISPATI analysis on a data set containing bars and clubs in Berlin. However, I am struggling to aggregate the point to areal data using a shapefile. In more detail: I have a ...
user avatar
  • 1
4 votes
1 answer
271 views

Aggregating polygons within range between polygons and specific area using QGIS

I wanted and I have tried in many ways to reproduce the "aggregate polygons" function from ArcGIS to QGIS. I have an input with different types of parcels intersected. The parcels must be ...
user avatar
1 vote
1 answer
64 views

Aggregating intersecting polygons into one in QGIS [duplicate]

In QGIS 3.16 I have one layer with a lot of single polygons and some of them intersect. I want to aggregate these intersecting polygons to one single polygon. As a result i need the size of the ...
user avatar
  • 85
5 votes
2 answers
156 views

Dissolving features with two fields and summing values for third field in QGIS

I'm trying to dissolve the fields "Inundation" and "EVC_BCS" (to get the areas of inundation and non-inundation for each rarity category). When I do the dissolve, I would also like ...
user avatar
  • 53
1 vote
0 answers
66 views

Aggregating points inside polygons using QGIS

I have two shapefiles: one with various points of Hospitals across Los Angeles another of the LA census tracts. I want to merge the two layers together to create one layer with all of that data ...
user avatar
4 votes
1 answer
178 views

'Evaluation error' when using Aggregate tool in QGIS

In QGIS 3.16. I am using the Aggregate function to reduce the number of features in a layer. I am grouping by one field and I want to concatenate the others. My actual data table is fairly large and ...
user avatar
  • 1,001
2 votes
0 answers
46 views

How can I improve my expression including an aggregate-function?

I have a polygon layer and a point layer ("wka"). I want to count the points in each polygon. I know I could do it with the following tools: "count points in polygon" or "join ...
user avatar
  • 1,903
1 vote
2 answers
142 views

Aggregating elements of array using QGIS

In QGIS 3, are aggregate functions over a set of array elemnts possible? As simple as in the form of: aggregate(array:=array(1,2,3), aggregate:='mean') I'd use it for the task to get an average for an ...
user avatar
  • 1,806
9 votes
2 answers
250 views

List of polygon neighbours with field calculator in QGIS 3

I'm using QGIS 3.16 Hannover. I've got a hexagon grid layer and I want to create, with the field calculator, a new field with the id's of the surrounding polygons. I've adapted the following ...
user avatar
  • 2,271
0 votes
0 answers
136 views

Downloading JAXA/GPM_L3/GSMaP/v6/reanalysis" hourly product in Google Earth Engine

I want to download "JAXA/GPM_L3/GSMaP/v6/reanalysis" hourly product for a relatively large area approximately 300000 square km and for a long period of time, say 15 years, since this product ...
user avatar
3 votes
2 answers
72 views

Modify expression so it can act in a group of points with a value in common

Can somebody help me to modify this expression so it can act in a group of points with a value in common? As it is right now it numbers the points extracted from a line based on the northernmost point ...
user avatar
  • 1,054
1 vote
0 answers
53 views

Aggregating Virtual Fields in the QGIS Layout

I have an atlas creating maps of parks. These parks contain different areas with different types of surfaces, which need to be managed differently. In my map-layout I'd like to summarise the area of ...
user avatar
  • 103
2 votes
1 answer
164 views

Group neighbouring features based on sum of attribute

Each polygon (building) contains "x" number of flats (eg "flat_num"=10 in one polygon/building). I would like to group multiple polygons if: the grouped polygons are neighbors ...
user avatar
  • 239
6 votes
1 answer
1k views

QGIS - Expression to aggregate values from an array

In a calculated field in QGIS 3.10.2 I wan't to aggregate values from an array field. For this aggregation I'm using a filter to compare matching id's and return value from another field. I can ...
user avatar
  • 1,273
1 vote
1 answer
179 views

Shapefile simplification

Sorry for the lack of terminology as it escapes me. I have a shapefile that contains 96000 individual polygons and I'd like to simplify the shapefile so that it creates 1 polygon. I think it is ...
user avatar
0 votes
0 answers
25 views

Aggregate heating energy demand based on building data and street segments with PostgreSQL and PostGIS

I have two datasets / tables: Georeferenced building data with the yearly heating energy demand per building Street line segments from OpenStreetMap. My goal is to calculate the total heating energy ...
user avatar
  • 1
1 vote
1 answer
999 views

Merging shapefile with dataframe and plotting using R

I am using R. I have a shapefile that gives me the provincial boundaries for a state and I want to use another dataset to combine the aggregate total enrolment in schools by 'district' to the ...
user avatar
1 vote
1 answer
309 views

QGIS: Creating contours at a certain elevation from DEM that match a value from a polygon layer

Trying to create contours from a 1m DEM at certain levels only when the contours fall inside a polygon with an field containing the desired contour elevation value. See images below. For example in ...
user avatar
0 votes
1 answer
134 views

Aggregate data from several polygons into one in QGIS [duplicate]

I am using QGIS 3.10.1, and I am trying to aggregate Census data (polygons) according to another set of polygons (neighbourhood areas that I have drawn). While I am able to clip the Census data to ...
user avatar
2 votes
2 answers
213 views

Translate aggregate into SQL function

In this question I was asking for a aggregate solution to update a attribute (ID) if I change or add an new feature and got a great answer from OGmaps: Add and change attribute / feature cascaded (...
user avatar
  • 7,653
0 votes
0 answers
28 views

Aggregating multiple time series to match MODIS timestep in R

I have multiple time series data for precipitation and evapotranspiration that are irregularly spaced. All but one of the datasets are daily products, but sadly one is a MODIS product that has ...
user avatar
5 votes
2 answers
103 views

Expression to show specific attribute of feature within (aggregate?)

I simply want to get a specific attribute (f.e. as label or default value in form) of a feature within another feature. Aggregate could do the job but it don't. Hard for me to write it down, so let ...
user avatar
  • 7,653
1 vote
1 answer
121 views

QGIS - Aggregating in virtual field

I'm using Qgis 3.10. I have two layers, let's say A and B. In layer A, there is informations about construction work (one row by construction). Each construction has an ID (ID-A). In layer B, there ...
user avatar
5 votes
1 answer
168 views

Count values from another layer based on value of current feature

I have two layers. One is a shapefile of U.S. states where each state is labeled with the attribute STATE_NAME, and the other is a CSV data layer named rid with many points that are labeled with a ...
user avatar
  • 240
0 votes
1 answer
36 views

Aggregating administrative boundaries using ArcMap

I am working with a shapefile with polygons at the state level which I am grouping using the dissolve tool. How can I save the resulting layers produced from the several dissolve output layers into ...
user avatar
1 vote
1 answer
68 views

Creating tracks for moving points (while discarding records without movement)

I have a csv with columns: id latitude longitude timestamp Many of the points (or "id"s) do not change "latitude"/"longitude" over time, others do. How do I filter out ...
user avatar
1 vote
1 answer
186 views

Making a spatial link to points within polygons in the field calculator in QGIS

I have a polygon shapefile of the counties in the UK and a separate point shapefile of project sites. Within the project sites attribute table I would like to add a new virtual column with the name ...
user avatar
4 votes
1 answer
193 views

Calculating the sum of a column based on another column in another table in the field calculator of QGIS

I have a records table with site numbers and abundances of different species at that site (e.g. site 1 has 6 common bats and 13 pipistrellus bats). I would like to sum total number (i.e. 6+13=19) at ...
user avatar
2 votes
1 answer
1k views

Aggregates Functions - QGIS - Calculating Area Explained

I've been reading through question and answers on the Aggregates Function, but have been unable to obtain a clear understanding and solution to my problem. I have a polygon grid ("Grid 4km") and I ...
user avatar
4 votes
1 answer
485 views

Layout expression for getting all features of layer within the current map view in QGIS 3?

In a map layout template, I want to insert an expression which gets all feature's names of a certain layer, which are contained in the current layout's view/extent. Is there a way to get an aggregate ...
user avatar
  • 1,806
6 votes
3 answers
1k views

Summing values in one field using PyQGIS

In QGIS 2.18 there is a shapefile with three fields accordingly id Type Value 1 a 5 2 b NULL 3 c 1 4 d 6 5 e NULL I want to get the total sum of all values in the field "Value". How ...
user avatar
  • 22.6k