Questions tagged [attribute-table]

A tabular set of data linked one-to-one to a set of spatial features.

Filter by
Sorted by
Tagged with
94 votes
5 answers
138k views

Renaming attributes/fields in shapefile attribute table using QGIS

I would like to rename some fields in my attribute table: Like rename "XRF_N3"in something else. It seems quite a easy issue but I don't find any information about how can I do that.
G M's user avatar
  • 2,058
51 votes
9 answers
51k views

Identifying duplicate attributes in field using QGIS

I have a point shapefile with thousands of points. It has an "ID" code field that is supposed to be unique. Every now and then the data entry clerk wrongly type the "ID" creating ...
obsidianz's user avatar
  • 513
49 votes
4 answers
50k views

Selecting features with NULL attributes in QGIS

How do I identify which features have NULL attributes in the attribute table of a shapefile? When i try [field]= 'NULL' it selects the features with value = 0 (see picture)
vascobnunes's user avatar
  • 5,532
48 votes
8 answers
174k views

Exporting attribute table to Excel from QGIS

I have seen all the questions for how to export an attribute table to Excel from QGIS, and I try all the answers like copy paste, CSV (in fact this I do not know where to find), but none seems to be ...
Po Po's user avatar
  • 841
47 votes
4 answers
61k views

Filling column with consecutive numbers in QGIS

I make a new column in my attribute table and it has a default value (for example 0). I want to (probably using the Field Calculator) have the result that row 1 has the value 1, row 2=2 and so on, ...
Shepherdjo's user avatar
  • 2,268
38 votes
10 answers
76k views

Adding Attribute data to shapefile?

I can display a shapefile in openlayers but I need to add some attribute data. I can open the dbf file in excel but there is no save as option in excel to the updated file as a dbf. What is the ...
ChrisJ's user avatar
  • 1,129
36 votes
7 answers
61k views

Changing CSV layer attribute value from text to number in QGIS?

I read in a CSV file for linking to a .shp file. All the variables that are just numbers came in as text. How do I change the text variables to numeric in QGIS?
HealthMaps's user avatar
29 votes
5 answers
55k views

Grouping and counting attribute data in QGIS

I want to group and count features with the same code attribute value. I can classify the data and enable feature count in the layer list but I cannot get counts in the attribute table.
Seren's user avatar
  • 321
27 votes
3 answers
80k views

Creating conditional statement in QGIS Field Calculator

In QGIS 2.8 I have a large data set and I would like to search one field for any values over a certain amount (in this case 20) and if the value is larger than 20, I would like to return a value of 1 ...
user35127's user avatar
  • 389
24 votes
5 answers
44k views

Using replace string function in QGIS Field Calculator

Within an attribute table, I'm trying to replace one string with another using the replace function. As an example, there are a number of features whose field "NAME" contains the string '(B)...
GrahamD's user avatar
  • 241
23 votes
3 answers
19k views

Accessing raster attribute table in QGIS?

I have some Python code that makes Raster Attribute Tables for GeoTiffs using GDAL. In ArcGIS I can see these attribute tables fine and they behave how I like (as classifications) but in QGIS the ...
Rich's user avatar
  • 1,559
22 votes
9 answers
71k views

Changing Field Name in ArcGIS Desktop

How can I change the field names (not the alias) in ArcGIS 10.2? I already found this page on ArcGIS support: "Renaming shapefile fields (Defense Mapping)" but there is is not "Defense ...
user1106951's user avatar
  • 1,496
21 votes
7 answers
79k views

Joining data from Excel to attribute table in QGIS without creating duplicates?

I have an attribute table with two empty fields in QGIS. I want to import an excel database to fill my empty fields in QGIS. My excel file matches the columns in my QGIS attribute table. I am able ...
Laurent Robitaille-Lainesse's user avatar
21 votes
3 answers
49k views

Replacing all null values from attribute table with zeros in QGIS

In QGIS 1.8 I have a new column in my attribute table with a lot of NULL values and I want to replace all them to zeros. How can I do that in field calculator?
Maria's user avatar
  • 213
21 votes
7 answers
13k views

Stopping writeOGR from abbreviating Field Names when using ESRI Shapefile driver

I'm currently using the following script to add some attribute data from a table to lots of individual shapefiles: library(rgdal) specieslist <- read.csv("SpeciesList1.txt", header=F) ...
JPD's user avatar
  • 1,658
18 votes
2 answers
16k views

Creating drop down list with values in QGIS

I want to show a drop down list in the feature attributes dialog. I have three different building zones. The hot Wohnzon A, B residential zone and residential zone C. Now I have an attribute called ...
user8839's user avatar
  • 603
17 votes
2 answers
24k views

Summing values in field using QGIS

Using QGIS 1.8, I've got a shapefile with an integer field called "AREA" and I'd like to sum the values which are in this shapefile. Does anybody know how to?
Robert 300's user avatar
17 votes
3 answers
7k views

How to refresh the attribute table of a layer after editing the table in the DB-Manager?

Is there any way to refresh the attribute table of a layer after editing the table (e.g. add a column) in the DB-Manager?
Lunar Sea's user avatar
  • 1,956
17 votes
3 answers
861 views

Sorting attribute table by hidden column in QGIS Print Composer

In a QGIS 2.18.20 attribute table I have some values with random numbers, but at the print composer I want to show them with order (clockwise). So I made a new integer column, and added numbers with ...
Pitheas's user avatar
  • 741
16 votes
3 answers
26k views

Changing value of attribute of QgsFeature using PyQGIS

I would like to update one attribute of a feature. However, I don't know to update it using the feature object. I have to use a data provider to update it. layers = QgsMapLayerRegistry.instance()....
wannik's user avatar
  • 525
16 votes
3 answers
19k views

How to change position of columns in attribute table?

If I have an attribute table with columns A B C D, is it possible to move the columns to different positions, say, B C A D? When making a new column with the field calculator it would be useful to put ...
HealthMaps's user avatar
16 votes
2 answers
20k views

What does an asterisk (*) mean when shown beside a field name in the attribute table?

What does an asterisk (*) mean when shown beside a field name in the attribute table? I would think those are reserved field names but they are not.
Jakub Sisak GeoGraphics's user avatar
15 votes
7 answers
45k views

Exporting attributes in KML file using QGIS

Here is what I am doing: Create a layer by uploading a shapefile into QGIS Select attributes of that file Export selected attributes with the "save only selected features" check box when I save the ...
Francesco Bria's user avatar
15 votes
1 answer
14k views

Changing View of Attribute Table [duplicate]

I have someone how changed the view that the Attributes are displayed when right clicking on a layer > "Open Attribute Table". I don't see the individual cells but instead see a view that appears to ...
joe d's user avatar
  • 281
15 votes
2 answers
3k views

Python, GDAL and building raster attribute tables

I have an integer raster for which I would like to build a raster attribute table using Python and GDAL. I can create a GDAL raster attribute table in Python as follows: >>> rat = gdal....
hendra's user avatar
  • 1,398
14 votes
2 answers
30k views

Summing data from column in Attribute table in QGIS

I'm working with population data, and I have an issue when it comes to knowing the sum of a population inside the attribute table. In my attribute table, I'd like to add all the numbers in the red ...
Tim56's user avatar
  • 1,022
14 votes
3 answers
10k views

ArcGIS Desktop tool that does for records in a table what "Dissolve" does for features?

I have a data table that I need to trim down, merging records which have the same value in an ID field and performing a couple math operations on various other fields (summing, averaging). The ...
Dan C's user avatar
  • 12.2k
14 votes
4 answers
43k views

Changing data type in attribute table in QGIS

I have county data in which the "FIP"s (actually State "FIP"s and County "FIP"s combined). I have data imported as CSV with the sames "FIP"s data titled '...
user10525's user avatar
  • 181
14 votes
2 answers
14k views

Modify Attribute Table while opening using PyQGIS

I have a problem related to this question and the script given as the answer. I can add some functionalities to Attribute Table (AT) by the script in the post. But according to the post, I have to ...
Kadir Şahbaz's user avatar
14 votes
4 answers
15k views

Join attributes of point and line layer by location (closest distance) in QGIS

My problem is the following: i have a line shp (target layer) and a point shp (join layer). the second one (point layer) holds an attribute which i want to join with a line layer based on closest ...
Miha Požauko's user avatar
14 votes
3 answers
3k views

QGIS hotkey assign: "select next feature and zoom to feature"

I have a dataset with 2000+ feature based on addresses. I need to zoom to each point individually and move them a little (no consistent shift so no other way to do it). Selecting the next feature in ...
Hannes Ledegen's user avatar
14 votes
5 answers
6k views

Reloading CSV file within QGIS

I use QGIS to illustrate the results from my Matlab simulation. Matlab produces a CSV file which is connected to a shapefile within QGIS. At the moment I have to close and reopen QGIS to show the new ...
Edgar's user avatar
  • 141
13 votes
2 answers
8k views

Changing column order with Table Manager Plugin in QGIS 3

There was a Table Manager Plugin in earlier QGIS versions I can't see it for QGIS 3 anymore. Is there a way to achieve this in QGIS 3.6?
Werner Horsch's user avatar
13 votes
3 answers
17k views

Extracting part of string from field in QGIS Field Calculator?

I want to create a new field in my attribute table. My goal: returning all digits between the / and _ characters of the field named "location" by applying the next expression: regexp_substr( ...
abrobia's user avatar
  • 137
13 votes
2 answers
6k views

Displaying attribute table on top in QGIS

I would like to pin (fix) the opened attribute table to the QGIS window or display the table on top. The attribute table is opening as another window (and it is possible to open the same attribute ...
SÚS Pk's user avatar
  • 191
13 votes
4 answers
20k views

Adding simple table of text (Excel) into layout and preserving formatting and clarity?

I am trying to put a simple table of text (excel) into my layout and preserve cell formatting including alignment, borders and text sharpness. I've tried many approaches but nothing so far is ...
John Bean's user avatar
  • 139
13 votes
1 answer
5k views

Opening attribute table using PyQGIS

Is it possible to open an attribute table from the Python Console or through a Python script in QGIS?
redfrex's user avatar
  • 333
13 votes
2 answers
2k views

Can labels for overlapping points be combined/merged into one label?

I have points representing sample locations. Often, multiple samples will be taken in the same location: multiple points with the same location but different sample IDs and other attributes. I'd like ...
Dan C's user avatar
  • 12.2k
12 votes
3 answers
6k views

Seeking keyboard shortcut in QGIS for opening attribute table?

Is there a keyboard shortcut for opening an attribute table for a layer in QGIS ? I'd like to avoid having to right-click on my layer and then use the drop-down menu to select "Open Attribute ...
Dre's user avatar
  • 337
12 votes
4 answers
6k views

Counting number of selected features in QGIS

I have performed a selection by expression (Attribute table) on a layer that contains thousands of features. I would like to know the number of features in this selection.
Luís de Sousa's user avatar
12 votes
2 answers
2k views

Displaying QGIS attribute table on the right

Is it possible to dock QGIS attribute table on the right? I know it is possible to display it on top and bottom, but for my project it would be better to dock it on right (or left) side.
pozytyw's user avatar
  • 121
12 votes
2 answers
18k views

Updating text column of selected features in QGIS

Let's say I have a bunch of postcodes. After making a selection and having the records highlighted in the attribute table, how to update all of them and give them the same category? In ArcGIS, after ...
Luffydude's user avatar
  • 2,288
12 votes
1 answer
2k views

Fastest methods for modifying attribute tables with Python?

A while ago, I wrote a quick Python function for converting an attribute table to a python dictionary, where the key is taken from a user-specified unique ID field (typically the OID field). ...
nmpeterson's user avatar
  • 8,248
11 votes
5 answers
17k views

Combining Columns QGIS Attribute Table

I have two columns in my QGIS attribute table. The first column contains values that aren't contained the second column and vice versa. I would like to add a new field that contains both the values ...
Dunuts's user avatar
  • 683
11 votes
5 answers
2k views

Getting dictionary for each feature with their attribute values using PyQGIS

I need to obtain, for each feature of a layer, a dictionary with the attribute names and their values using PyQGIS. I can get all the attributes of the layer using: from qgis.core import QgsProject ...
Raúl Casado's user avatar
  • 1,059
11 votes
3 answers
14k views

Joining tables without losing original field names in ArcGIS for Desktop?

I'm wondering if there is any method to preserve the original field names in ArcGIS when I join csv. tables to a Shapefile. I ask, because sometimes I join tables with 10, 20 or even more columns ...
Dspanes's user avatar
  • 1,391
11 votes
1 answer
9k views

Forcing ArcMap to recognize text field in CSV file

Related to Data-type detection in ArcGIS table loading I have a CSV file which contains a mixture of numeric and text fields: ID,Txt,Int,Dbl 12345,abc,45,56.78 12346,9,65,23.12 12347,10,66,23.13 ...
Stephen Lead's user avatar
  • 21.1k
11 votes
2 answers
1k views

Quickly browsing of features for the active vector layer?

I often need to view on the canvas the (selected or not) features from the current active vector layer. In this situation, I only need to view something on the canvas, without doing anything on the ...
mgri's user avatar
  • 16.1k
11 votes
1 answer
739 views

Setting all the values in attribute field to the same value with PyQGIS

When I use "Update existing fields" in the Field Calculator in QGIS 3.16.0-Hannover, it takes only a second to change all the values in a attribute field to the same value. However when I ...
meteergen's user avatar
  • 375
11 votes
2 answers
5k views

Renaming attribute/field names for GeoPackage layer in QGIS

I need to rename several attributes/fields in a GeoPackage layer. How to do this? There are numerous pages on how to rename the attributes/fields of a shapefile. However, there do not seem to be any ...
MetroPietro's user avatar

1
2 3 4 5
44