Questions tagged [feature-count]

Display number of features of a layer in QGIS

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

Showing feature count when exporting map with qgis2web Plugin

I am trying to include the feature count when using the qgis2web PLugin. I have a point layer and I simply want to show the number of features for each specific field. This is what I see in the layer ...
Bill Sostrich's user avatar
1 vote
1 answer
53 views

Style with ruler and entity count in QGIS

My layer style is rule based. The number of entities is displayed. When I uncheck certain items in the variable, the number of entities not displayed ends up going to zero. Redisplaying the items ...
fcka's user avatar
  • 899
0 votes
1 answer
34 views

Showing feature counts for some legend items only in ArcGIS Pro

I would like to display the counts for the year features, but not the National Park boundary or Roads in my legend. I was able to turn the counts on for all of them (Legend Items > show properties &...
Kate's user avatar
  • 99
0 votes
1 answer
36 views

Count polylines crossing each raster cell

I'm looking for the best way to count polylines crossing each raster cell and assign that count value to the raster cell using arcpy. On input I have a shapefile with hundred thousands of polylines ...
Andžej Miloš's user avatar
4 votes
1 answer
138 views

QGIS: Manually control "showFeatureCount" display for layer labels in legends

Is there a way to manually control the feature count for vector layer legend entries in a print layout in QGIS? Activate feature count for a vector layer in the layer tree context menu for the layer ...
winnewoerp's user avatar
  • 1,291
1 vote
1 answer
46 views

Display feature count in legend by map extent using mask and atlas plugins in print composer

I'm trying to generate thematic maps from point layers representing citizen requests using QGIS's Atlas map composer plugin as well as the Mask plugin to target the number of requests per district. I ...
ttamba's user avatar
  • 141
4 votes
1 answer
218 views

Count the number of features in a given map extent as dynamic text in map layout

In QGIS (3.22) print layout I want to calculate the number of companies in a given map extent as a dynamic text via expression. I am using the Atlas Tool. However, with the following code I do not get ...
user215393's user avatar
3 votes
1 answer
127 views

Numbering points that are contained in polygons in QGIS

In QGIS 3.16.8-Hannover I have a layer with polygons and I have a layer with points. Each polygon contains a certain number of points, I would like to assign a number to each point in sequential order ...
Ghostwriter84's user avatar
2 votes
0 answers
232 views

QGIS legend feature count by map extents

I have a legend in a layout and want to show the feature count within the extents of the map on the layout (Map 1). When I click on 'Show feature count for each class of vector layer', the count of ...
Mecky's user avatar
  • 51
1 vote
1 answer
121 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 ...
Phil's user avatar
  • 71
7 votes
2 answers
350 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:\...
patrickblancseau's user avatar
2 votes
0 answers
113 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 ...
Nski's user avatar
  • 31
3 votes
2 answers
599 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 ...
Bjoern's user avatar
  • 283
8 votes
3 answers
2k 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 ...
Geografisica's user avatar
2 votes
2 answers
297 views

Right-Align Legend Feature Counts in ArcGIS Pro [closed]

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 ArcGIS Pro: Is there ...
Sky's user avatar
  • 39
2 votes
2 answers
488 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 ...
Cupain's user avatar
  • 695
3 votes
1 answer
272 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 ...
krukkie's user avatar
  • 31
1 vote
1 answer
304 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 ...
Bernd V.'s user avatar
  • 3,221
2 votes
0 answers
28 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 ...
Lambo's user avatar
  • 21
4 votes
3 answers
1k 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 ...
BPal's user avatar
  • 101
11 votes
2 answers
6k 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 ...
Mapos's user avatar
  • 547
2 votes
1 answer
2k 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. However, when turned ...
user74862's user avatar
  • 111
2 votes
1 answer
469 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 ...
Philip Whitten's user avatar
8 votes
1 answer
2k 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 ...
Palatkik's user avatar
3 votes
2 answers
467 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 ...
Keshav Sharma's user avatar
1 vote
2 answers
247 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 ...
mbela's user avatar
  • 127
1 vote
1 answer
109 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 ...
Samantha B's user avatar
-2 votes
1 answer
977 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 ...
Ending's user avatar
  • 555
4 votes
1 answer
533 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)?
Ending's user avatar
  • 555
0 votes
2 answers
59 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 ...
Rororo's user avatar
  • 41
7 votes
4 answers
3k 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 ...
Ruslan's user avatar
  • 653
3 votes
1 answer
2k 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?
Nina's user avatar
  • 31
6 votes
1 answer
940 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 ...
Jochen Schwarze's user avatar