Questions tagged [feature-count]

Display number of features of a layer in QGIS

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

Counting all line features that overlap specific one from different shapefile

I have two shapefiles: 'Lines' and 'Base-line'. One attribute inside 'Base-line' is the number of 'Lines' features overlapping that specific 'Base-line' feature. It basically represents the number of ...
6
votes
2answers
169 views

AttributeError when counting entity number using PyQGIS

I'm trying to count the number of entities but each time I have this error: `AttributeError: 'dict' object has no attribute 'featureCount' while I have only one selected layer uri = r"C:\...
1
vote
0answers
39 views

Feature count continues after turned off [closed]

I have several vector layers for which I had at one point turned on "show feature count" I've since turned it off, but every time I work on one of my layouts, I get constant pop-up ...
3
votes
2answers
310 views

Adding consecutive unique ID for distinct value sets and sorting by date [closed]

I have a layer with features, which have a unique ID, called "Object_id". A second column is "Date", a third called "info" (see below). What I need is to fill the fourth ...
8
votes
3answers
659 views

Adding consecutive unique ID starting from 1 for each distinct set of values

I need to add a unique ID (using $ID or @row_number) but the problem is that I need to start from 1 to "...n" considering identical values from other field, then, when there is a different ...
2
votes
2answers
139 views

Right-Align Legend Feature Counts in ArcGIS Pro

I would like to align the feature counts in my legend, to look like this legend, generated in ArcGIS Online: which I believe is much easier to read than this one, generated in ArcPro: Is there any ...
2
votes
2answers
146 views

Count features in layers and categories

I want to automatically count features in my opened layers, and add the result in the layer name, with pyqgis. I can do it with this code : layers = QgsProject.instance().mapLayers().values() for ...
3
votes
1answer
89 views

Get number of changed features in a layer using pyqgis

I'm looking for a method to find out how many features in a layer have changed during edit mode (specifically attribute values). For my example i'm using QgsVectorLayerEditBuffer object, method ...
1
vote
1answer
192 views

Count subset of points in polygons

Being an SQL-noob, I found a working solution to generate a virtual layer with counts of points in the polygons of another layer, inspired by this https://gis.stackexchange.com/a/54680 SELECT ...
2
votes
0answers
23 views

All the third level Submenus in QGIS are gone

I suddenly am missing all of my third level submenus in QGIS. I wanted to use count points in polygon which exists on the vector analysis menu- but selecting it shows no other menus or dialog box ...
4
votes
3answers
218 views

Counting number of polygons inside zone using QGIS?

I've seen a lot of questions about counting the number of points within a polygon but my question is I have 1 vector layer with polygons showing past landslides that have occurred and another 206 ...
10
votes
2answers
3k views

Counting number of features within another feature using aggregate function in the QGIS Field calculator

My data: 1 polygon layer + 1 point layer My target: Calculate the number of points and the sum of a field within each polygon using the aggregate function in the QGIS field calculator. I know I can ...
2
votes
1answer
693 views

Formatting legend item and feature count text in ArcGIS Pro?

In ArcGIS Pro you can turn on the option "Show feature counts" in Format legend item -> Feature Display Options to show the number of features for each legend item. When turned on however the number ...
2
votes
1answer
321 views

Feature Count for Categorized Layers with the Atlas function of Print Layout in QGIS 3

In QGIS, is it possible to count the features of each class in a categorized layer where the features being counted are limited to those that are inside the current atlas feature? I have tried ...
7
votes
1answer
1k views

Showing feature count for layout extent on legend using QGIS?

I'm using QGIS 3.6.1 on Win10. I have a print layout with a map of an area within my total work data set. I add an item to the print layout legend with the summation button on for "Show feature ...
3
votes
2answers
363 views

Automate filling of attribute table using QGIS?

I am new to QGIS and wish to automate my current process. In my project I have to open the attribute table of the batch_16 layer having 5 fields (date, checked_by, td_created, td_catagor and ...
1
vote
2answers
143 views

How to efficiently extract specific metadata for many shapefiles?

I have a directory with 50 subdirectories containing a total of 300 shapefiles which I would like to query for their feature count and output to a text file. Thus far I am able to get the feature ...
1
vote
1answer
75 views

Trying to Count Number of Points within Specified Distance from Lines using Carto?

There were multiple points stacked on the same coordinates that I did not notice. I am trying to count the number of points within 10km of lines (routes) so the routes can be styled according to the ...
-2
votes
1answer
508 views

Using PyQgis to count number of features in category [closed]

Is there a way I can use pyqgis to count the number of features in different categories in one layer? I am using rule based renderer, and realizing that for some rules the feature count is actually ...
4
votes
1answer
281 views

Get number of changed features in a layer under edit mode using pyqgis

Is there a method I can find out, how many features in a layer have changed during edit mode (including changes in the attribute and the geometry)?
0
votes
2answers
53 views

Counting kilometers/lines with ArcGIS

I am trying to get a measure of border intensity of different regions in Europe. Having a relevant shapefile of European countries at the regional level (NUTS2) as well several ones by century for a ...
6
votes
4answers
2k views

Fill with @row_number based on group field in QGIS 3

Is there a way to fill the table with a row number so that count will restart as new group (identified by a separate column) starts? As a result, "row number" column will restart the count ...
3
votes
1answer
1k views

Getting total feature count for multiple layers using PyQGIS? [closed]

I want the total feature count of all the features in all my layers. Doing it manually in QGIS 2.18.16 is too slow. I have been trying PyQGIS, but am not good with PyQGIS. Any tips?
5
votes
1answer
702 views

Update feature count of QGIS Layers using PyQGIS when data source changes

In QGIS 2.18.19 I have a PostGIS Layer with a rule based render and activated show feature count. The feature count does not change automatically when doing some INSERTs (or DELETEs as well) directly ...