Questions tagged [attribute-table]
A tabular set of data linked one-to-one to a set of spatial features.
2,183
questions
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.
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 ...
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)
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 ...
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, ...
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 ...
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?
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.
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 ...
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)...
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 ...
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 ...
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 ...
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?
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)
...
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 ...
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?
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?
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 ...
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()....
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 ...
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.
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 ...
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 ...
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....
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 ...
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 ...
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 '...
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 ...
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 ...
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 ...
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 ...
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?
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( ...
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 ...
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 ...
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?
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 ...
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 ...
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.
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.
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 ...
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). ...
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 ...
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
...
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 ...
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
...
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 ...
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 ...
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 ...