Questions tagged [grouping]

Associating or clustering data based on common attributes or properties.

Filter by
Sorted by
Tagged with
2 votes
2 answers
110 views

Filling attributes in one field based on second field with same values in QGIS

How do I fill the attribute with "SID_2" of the captured image where the ID of "SID_1" is NULL? I'm using QGIS 3.22
user avatar
  • 27
4 votes
1 answer
101 views

Calculating two columns at once in QGIS

Is it possible to calculate two columns at once? So what I mean is that we have different covers and lengths and I want a total length of "Cover A" after that a total length of cover tb and ...
user avatar
  • 41
1 vote
0 answers
25 views

Clustering contiguous polygons in QGIS

I am using QGIS. I have a vector layer with square polygons. The attribute table contains 2 columns: the ID of each grid and a column with a values 0 or 1. I want the grids with value=1 to be ...
user avatar
  • 11
1 vote
0 answers
29 views

Group points based on proximity and equity using QGIS

I would like to group students based on the nearest school, but also having mixed social categories within the group of students. I have x,y coordinates for the students and the shcool. Each student ...
user avatar
  • 11
1 vote
0 answers
24 views

How to calculate sum of night light radiance for each feature in a feature collection?

I have a shapefile which contains 36 polygons (districts/counties). For each district, I want to calculate sum of lights (as well as count total number of pixels). I tried following code but failed. ...
user avatar
4 votes
1 answer
76 views

Grouping lines by name and determining their proportions using Virtual Layer

I have a line layer with hiking trails. The hiking trails are divided into their surfaces. So one hiking trail consist of parts with different surfaces. I would like to use a virtual layer to group ...
user avatar
  • 7,663
2 votes
2 answers
82 views

Selected item in layertree group or layer?

How do I check in PyQgis if the selected item in de QgsLayerTree is a group or a layer. I really can't find the answer.
user avatar
  • 435
4 votes
2 answers
182 views

Grouping and measuring total length of road based on specific attribute in QGIS

I have this dataset that describes the cycleways of a city. I want to measure the km of cycleway for each type of highway (residential, track, unclassified, ecc) and then calculate the percentage of ...
user avatar
  • 161
4 votes
1 answer
183 views

Unsplitting/merging lines that have coincident endpoints using PostGIS

I have a large dataset of lines/linestrings (ie. a road network), which is unregularly segmentised/ split and the lines needs to be merged at coincident endpoints (if only two lines are touching). I'd ...
user avatar
  • 153
3 votes
2 answers
162 views

Summarizing fields with same ID in QGIS Field Calculator

I am looking for a command, that sums the value of the field "Baulast" if they have the same "ogc_fid" and if there is a Number in the field "WEA". If there is no number ...
user avatar
  • 233
3 votes
2 answers
195 views

Adding unique ID for consecutive groups using Field calculator in QGIS

I found a similar question on this site and the answer suggested: array_find( array_distinct( array_agg("PortCluster_ID") ), "PortCluster_ID" ) + 1 ...
user avatar
4 votes
2 answers
63 views

Replicating ArcMap legend in QGIS 3

I am trying to replicate this ArcMap legend in QGIS but i can't seem to get it right. I am stuck in print layout and using QGIS 3. I have the title 'LEGEND' but i do not know how to categorize the ...
user avatar
  • 41
3 votes
3 answers
157 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
44 views

Dynamic buffer regroup [duplicate]

I am using QGIS 3.16 and I want to create a dynamic buffer around a layer of points, so that every time I move some point the buffer also moves. I have succeed by duplicating the layer and then ...
user avatar
0 votes
1 answer
28 views

Hiding/Displaying dashboard content (tiles) based on user or group logging in using ArcGIS JavaScript API

I want to know if it is possible to either hide or display the content of an Esri webapp, dashboard, or experience (tiles, widgets, data layers, filters) depending on which Portal user is accessing ...
user avatar
  • 1
2 votes
1 answer
55 views

Clustering of points but with a condition of not crossing set of lines

I have multiple sets of around 200-300 points and I have the following requirements: Cluster the points in each set into a group of points with a minimum & maximum number (as defined by me). In ...
user avatar
0 votes
0 answers
15 views

Which analysis to use? Analysing points' likeness across multiple fields including proximity. (AHP?)

I don't have much of a background in coding. I have a point layer with 400 points. The attribute table contains 3 fields of interest: Bearing (values between 0-180); a Ratio (ratio of ellipse long/...
user avatar
6 votes
2 answers
242 views

Counting fire occurences per county per year using QGIS

I wish to loop through this shapefile, and for each "COUNTY_NM", count the number of values corresponding to each "layer" value. I want to output a CSV or equivalent which would be ...
user avatar
  • 313
0 votes
0 answers
41 views

Grouping polygons by maximum sum of attribute using ArcGIS Pro

I have an exercise with several boundary polygons with the fields "number of cat owners" and "owned cats" inside the area. Sample Data polygon ID cat owners cats 1 4 12 2 2 3 3 ...
user avatar
1 vote
1 answer
231 views

Rename layers within group automatically by adding a prefix derived from group name using QGIS

I have some Sentinel derived rasters (time series) divided in tiles. In my QGIS (3.16) each tile is represented by a group. Each group contains rasters from different dates and according layernames. ...
user avatar
  • 427
0 votes
0 answers
40 views

Graphic grouping in QGIS Map Layout

In QGIS 3.18, I'm trying to draw symbols/graphic for Map Legend manually in the Map Layout. When grouping them, it shows the big box like the screenshot below and seems not convenient to continue ...
user avatar
0 votes
1 answer
902 views

GeoPandas TypeError: geometries are not orderable (numpy: TypeError: '<' not supported between instances of 'Point' and 'Point')

I'm trying to group rows of a GeoDataFrame based on a common gid value and aggregating two columns for which the values differ but I am facing this error: TypeError ...
user avatar
  • 6,698
2 votes
1 answer
111 views

QGIS - creating a report from attribute table

I create a report from attribute table. At one column I have a name of a street, at second column I have a number. Relation between street and a number is one-to-many. Is there a function to show at ...
user avatar
  • 405
5 votes
3 answers
200 views

Generating unique code for features via grouping by several attributes

I have features with 3 columns of information ("material", "name", "dimension") in the Attribute table. I need these features to group - to create 4th column where ...
user avatar
  • 405
1 vote
1 answer
110 views

Dissolving polygons based on data values in GeoPandas

I have a long list of polygons in the GeoPandas GeoDataFrame (Sample below) Index zone_name value geometry 0 A 100 POLYGON ((77.47638480859382 13.05584728590942, 77....
user avatar
  • 83
0 votes
2 answers
211 views

Sampling points in R with both distance constraint and group

I have a spatial point data frame with categorical variable as a column named "type", I would like to draw a random sample from these points (let's say 100 points) with maximum and minimum ...
user avatar
  • 160
3 votes
2 answers
321 views

Area of each polygon that intersects another layer and total area of intersections in QGIS

I have two layers: 'A' (orange) and 'B' (purple). Using a Virtual Layer and group_concat I am able to list the polygons in layer 'B' that intersect with those in layer 'A' thanks to @Jesse McMillan's ...
user avatar
  • 71
0 votes
1 answer
31 views

Composite layer by distance

I've got a complicated problem right now. I have a layer with polygons and use the tool "Closest Neighbor" to find all Polygons that have a neighbor within 10 meters. That works fine, but ...
user avatar
1 vote
1 answer
285 views

Assigning incrementing id for each feature group in attributes with QGIS expressions [duplicate]

I have a layer with a repeating field name, thus different groups of features (I also have a numerical group field). How can I add a field group_id, using QGIS expressions? What I want is kind of a ...
user avatar
  • 40k
2 votes
1 answer
26 views

Grouping a dataframe whilst making a pie chart

I have a data layer which consists of an attribute table of ~30 columns and ~6000 rows. This table contains information about buildings that are located close to parks in Amsterdam. I want to create a ...
user avatar
2 votes
1 answer
167 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
4 votes
2 answers
331 views

Summing area of by several attributes in QGIS

I have a shapefile that contains building footprints with multiple addresses with different functions (with each an usable area). I would like to calculate the sum of the usable area, per building &...
user avatar
  • 239
1 vote
0 answers
607 views

Exporting with QPackage or QConsolidate

I know there is a similar question, but it might be dated, and didn't completely answer my question. I know of two plugins to export your QGis project, QPackage and QConsolidate. I'm not very familiar ...
user avatar
  • 117
1 vote
1 answer
76 views

Find Largest Building in each Parcel (largest feature in each groupby set)

I have a question similar to this one, but the proposed approach doesn't seem to work. For context, I am new to qgis. Given a set of parcels, each with 0 or more buildings, I want to select only the ...
user avatar
  • 139
0 votes
0 answers
45 views

Creating polygons from open ended line (riverine) feature

I have a dataset of rivers which I'd like to build into polygons of areas enclosed by rivers. The rivers are continuous lines but there are open ends. Is this possible? It's OK if the calculated ...
user avatar
5 votes
1 answer
108 views

Copying all visible layers to new group

I would like to copy all visible layers in a project to a new group. Does anyone know of a quick way of doing this? Background: We have a Project that acts as a library for all the spatial data we ...
user avatar
  • 51
7 votes
4 answers
800 views

Adding unique ID for groups of items using Field calculator in QGIS

I have a set of string values in a shapefile's attribute column and want to assign a number to them in a way that each unique string gets an integer number, like this: How do I do this using the ...
user avatar
  • 115
0 votes
1 answer
97 views

Large-scale cloud masking, grouping and mosaic in Descartes Labs platform

I am looking to create a stack of cloud-free sentinel-2 imagery by day for a large portion of California for all of 2020 in the Descartes Lab platform. I realize that this is a very large amount of ...
user avatar
1 vote
0 answers
27 views

Using a postcode sector map with a population attribute, create clusters of those sectors to have a total population within a defined range

I have a postcode sector map in QGIS and one of the attributes is 'population'. I am trying to create a map showing what postcode sectors would need to be clustered together in order to split the ...
user avatar
  • 29
2 votes
2 answers
87 views

Merging attributes of point features at same location

I have a CSV-file with all the facilities in an area, some sites have multiple facilities so at some locations there will be multiple points e.g. sports hall and swimming pool. Is there a way to join ...
user avatar
  • 21
0 votes
0 answers
240 views

ArcMap - error 000728 field does not exist within table

I'm trying to join the table from Excel (my calculation about one region in Poland) to my shapefile (which contains whole Poland map and different calculations, so I need to attach a new table to be ...
user avatar
2 votes
1 answer
96 views

Categorizing attributes by keyword in new field with field calculator in QGIS 3

So, the geological classification shapefile of the Philippines has the 'DESCRIPT' field which contains the geological time scale of each feature. "Oligocene-miocene" and "Oligocene-miocene (igneous ...
user avatar
  • 1,127
0 votes
0 answers
39 views

Calculate frequency based on a filtered field, and put the value in another field

I'm a python beginner. I'm working on one feature class, i would like to group this feature based on group_ID field, and then for each one of this group i would like to calculate the number of rows ...
user avatar
  • 115
3 votes
1 answer
419 views

Centroid of multiple polygons based on value in attribute table

I have a (polygon) shapefile with multiple zones. Now, I would like to calculate the centroid of groups of these zones. The zones have to be grouped based on a value in the attribute table: AreaNr ...
user avatar
  • 113
2 votes
1 answer
585 views

QGIS - SQL GROUP BY and MAX

I have a layer which contains a unique ID (UID) for each feature and another column of Scores. For example: UID, Score A12,1 A13,1 A14,4 A12,2 A13,3 A14,5 I would like to use an SQL statement to ...
user avatar
  • 293
0 votes
0 answers
46 views

How to make analyzeGPS distanceGPS group by trip?

I have a dataset with id, lat, lon and time, where each trip has a unique id. When I try to use mutate with the distanceGPS function in the AnalyzeGPS package and group by trip using this code: gps%&...
user avatar
  • 11
1 vote
2 answers
166 views

Finding number of days per ID in table using ArcPy?

I need to count the span of days an individual has been observed, from the first til the last observation day. There can be many observations per ID per day and not everyday has observations, hence ...
user avatar
  • 13
2 votes
0 answers
123 views

Grouping layers by attribute value and finding nearest neighbour using QGIS?

I am new to QGIS. I have two layers (layer_a and layer_b) consisting of two sets of points. If I want to find the nearest point in layer_b for each point in layer_a, I can just use the Distance ...
user avatar
2 votes
2 answers
68 views

Update 1 random value in a group of values

I have an attribute table with a date field and a random field. The date field has three different times for each day. I need to input a '1' in the random field for one of those three times in each ...
user avatar
  • 85
1 vote
2 answers
239 views

How can QGIS 3.X create atlas by a group field?

I have a line layer with 8 features and a field TYPE (5 features is type_A and 5 features is type_B). I want to create a atlas which output is two single image (one is grouped by typ_A with 5 features,...
user avatar