Questions tagged [fields-attributes]

Fields, also known as attributes, contain information about features.

Filter by
Sorted by
Tagged with
62
votes
3answers
63k views

Renaming attributes/fields in shapefile attribute table using QGIS?

I would like to rename some fields in my attribute table: Like rename XRF_N3in something else. It seems quite a easy issue but I don't find any information about how can I do that... I've QGIS 1.8 in ...
30
votes
5answers
16k views

Change style properties of several layers simultaneously?

I'm working on bulk data. I have a few hundred GeoTIFF images imported into a QGIS project, and I'd like to modify their layer properties - things like the no-data-value, transparency of certain pixel ...
30
votes
3answers
17k views

How to easily edit attribute data using Regular Expressions?

I am writing a tutorial for MSc students that uses QGIS. One of the tasks requires the attribute data to be modified (see pdf draft of tutorial here if interested ). The question is how to get them ...
26
votes
7answers
18k 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 duplicates. Right now I'm ...
21
votes
3answers
58k views

Merging/Dissolving polygons by Common Attribute Field in QGIS?

I have joined corresponding Local Enterprise Partnerships table data into a polygon shapefile containing UK Local Authorities. How do I Dissolve or Merge the the Local Authorities polygons by ...
17
votes
8answers
58k views

Changing Field Name in ArcGIS for 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 Mapping" on ...
17
votes
1answer
7k views

How to change the field value of a Shapefile using GDAL/OGR?

I am trying to change the field value of a shapefile. However it doesn't change the value. What's wrong with my code? import ogr driver = ogr.GetDriverByName('ESRI Shapefile') fn = 'dist.shp' ...
16
votes
8answers
3k views

Sorting by multiple fields at same time in QGIS?

Is it possible to sort multiple fields at the same time in QGIS? For example, I'd like to sort a table by state name, and then within each state, sort by county name. This would be the same as ...
16
votes
2answers
598 views

Can colon (“:”) character be used in shapefile field names?

I am trying to find out if the : character is allowed in the name of ESRI's shapefile field. I googled, but I couldn't find an answer. Here is an interesting quote from the article from ESRI FAQ ...
15
votes
1answer
787 views

Filling shape with labels or attributes in QGIS?

In QGIS, I would like to set the fill of a shape to be a pattern repetition of label values (i.e. an attribute of the item). Is this possible, looking a little like the sketch below (for shapes with ...
15
votes
3answers
12k views

Exporting only certain columns to CSV file in ArcGIS for Desktop?

I've written a python script using arcpy which outputs a polygon feature class into a File Geodatabase. I have added a function to export the attributes to a separate CSV file. I am using the code ...
14
votes
2answers
21k views

Maximum length of text fields in shapefile and geodatabase formats?

The maximum text string for a field in a geodatabase is 320 characters. The data I am importing has long character strings and it seems to be truncating when I convert into shapefile at the max ...
14
votes
4answers
10k views

Re-ordering fields permanently using ArcGIS Make Query Table tool?

In the Answer to Reordering fields (permanently) in file geodatabase using ArcGIS Desktop? it was stated that the Make Query Table tool could be used to re-order fields in tables and feature classes ...
12
votes
2answers
7k views

Understanding Join Attributes by Location in QGIS?

I wonder if there is somewhere an explanation for the parameters that can be set when running the Algorithm "Join Attributes by Location" in QGIS 2.18. I had a look here: Documentation QGIS Testing |...
12
votes
1answer
308 views

QGIS, Populate field with self-updating formula (like spreadsheet)

Is there any way (plugin, or otherwise) to put a formula as the value of a field, which would then self-update as the other fields it is based on are adjusted? Exactly the way field-calculator updates ...
12
votes
2answers
2k views

Setting a default value in a QGIS field

I would like to add in a layer's field a default value. I mean, every time a new feature is created, that field would be automatically filled with the default value. In my case the default value ...
11
votes
1answer
1k views

Adding text fields with more than 255 characters?

I'm working on a QGIS project where I have few shapefile layers with text fields. I would like to add whole paragraphs as descriptions to the text fields, however the fields are limited by their ...
11
votes
3answers
36k views

Changing data type in attribute table in QGIS?

I have county data in which the FIPs (actually State FIPS and County FIPS combined). I have data imported as CSV with the sames FIPS data titled STCounty. However, the shapefile FIPS is listed as a ...
11
votes
1answer
4k views

Writing vector layer to CSV file with geometry using PyQGIS?

I use Python try to write vector layer file to csv file with this code: QgsVectorFileWriter.writeAsVectorFormat(mylayer, r'c:\temp\xyz.csv', "utf-8", None, "CSV") It can export to xyz.csv but only ...
10
votes
1answer
2k views

How to add an attribution on a GeoJSON Layer from Leaflet?

I need to use a GeoJSON Layer on my Leaflet map. Here is a sample of my code: function onEachFeature(feature, layer) { if (feature.properties && feature.properties.popupContent) { ...
9
votes
5answers
15k views

Renaming field using ArcPy?

What I need to do: rename a field name of a table/feature class copy all values to the new field So far I have done following code as @artwork21 suggests: import sys import traceback import arcpy ...
9
votes
6answers
8k views

Creating label formatted like “ 1,000' ” from numeric field?

This question builds on a previous question I came across at gis.stackexchange: How to easily edit attribute data using Regular Expressions? Perhaps someone can point me in the right direction? I ...
9
votes
3answers
3k views

How to convert a string field to a date field

I have a layer with points which represent the fatal road accidents and the field "dates_14_D" contains their date but its type is string. I would like to convert this string field to date field but ...
9
votes
1answer
1k views

Determining Shape Area Field Name

I'm dealing with a varierty of spatial polygon files (shapefiles, file/personal gdb feature classes, sde feature classes (some with spatial views)) and depending on the file type, I get a mulittude of ...
9
votes
1answer
2k views

Adding field and calculating expression with PyQGIS?

I want to use PyQGIS to add a new field and calculate the values for each feature. Similar to Field Calculator option. My 'Field Calculator' expression is for example: y(start_point($geometry)) from ...
9
votes
1answer
8k views

Reassigning raster cell values from another attribute in raster attribute table?

I have a large (size of lower 48 U.S.) 100m resolution raster dataset that has a raster attribute table (RAT). The data were created by someone else. One of the attributes in the RAT has the data ...
9
votes
2answers
4k views

How to specify fields to export from QGIS?

I'm using QGIS 2.0.1 and am connected to a MS SQL Server spatially enabled database (not ESRI). I am able to connect to the layer and load it into my TOC just fine. I have hidden a number of fields ...
8
votes
2answers
377 views

ESRI Field Names?

A shapefile I retrieved from the Pennsylvania Redistricting site contains field names like TAPERSONS, TA1RACE. TAWHITEALN. TABLACKALN... or VAPERSONS, VA1RAC, VAWHITEALN... Some online forensics ...
8
votes
3answers
445 views

Zoom from one feature to another in edit mode?

I have to manually edit a shapefile of a couple of hundred points. I would like a quick way to jump from one point to the next in both the attribute sense and the visual/spatial sense i.e I would ...
8
votes
1answer
2k views

Programmatically associating layer with custom UI using PyQGIS?

I know it is possible to associate a layer with a custom UI for editing feature attributes using the QGIS interface. But is this possible with Python? This link shows how to achieve the result ...
8
votes
4answers
8k views

Deleting columns/fields from polygon shapefile attribute table?

I have a polygon shapefile that is loaded with old demographic data in its attribute file, I just received the new data today in xls format. What I want to do is just delete the old demo data from ...
8
votes
5answers
1k views

Print out the properties of the attribute table in qgis?

I have to merge a lot of shapefiles into one great shapefile. So I want to compare the properties of the attribute tables to see if there are differences between the tableproperties of each shape (...
8
votes
2answers
3k views

Capitalizing The First Letter Of Each Word In Attribute Field

Does anyone know of a way to capitalize the first letter of each word in a field in an attribute table? I am doing this in QGIS. I know of field calculations to change all the words to Lower or ...
8
votes
1answer
693 views

Deciding length of shapefile fields?

At my work have inherited several shapefiles that originate from MapInfo that I am bringing into a new project in QGIS. I have the opportunity to change the column names, add and subtract columns and ...
8
votes
1answer
631 views

How to merge two shapefiles with partial difference in QGIS?

As illustrated below, a copy of the same shapefile was given to two persons who edited them partially by changing the attributes of different features. I would like to know how to merge the two ...
8
votes
1answer
4k views

How to check if feature class or table contains field with specific name before adding it?

Im trying to write a script that finds out if the shapefile has a specific field and if not to add the field. I get it to show me the field, but the loop goes through each field, so it would create a ...
8
votes
1answer
6k views

How to copy values from field to another using arcpy?

Can some one please let me know how I can do simple field calculation like Copying From "A" to "B" in ArcPy? I have found lots os example on web which they all used extra expression and they were ...
8
votes
4answers
2k views

Open source web map client with time sliders using WMS source

I have a web map service (WMS on geoserver). It has a current visualization which is decent. The data is divided into months currently using tabs. I would like to visualize the data using an open ...
8
votes
2answers
400 views

Clean up attributes

I want to clean up the attribute table of a road shapefile for all the entries in the fields. For example: As seen below I have a road feature with a "Name", Name From and Name To in the attribute ...
8
votes
2answers
2k views

Change default field properties for number format in ArcMap?

Anyone who has worked with numbers that have more than 14 digits has run into ArcMap's wonderful habit of converting any number of such length to e-notation. While changing this is a simple matter of ...
7
votes
2answers
14k views

How to delete multiple fields in an attribute table?

Is there a way to select multiple fields in an attribute table and delete them together in Arcmap without writing the script?
7
votes
2answers
20k views

Why can't I edit attribute table imported through 'text as layer'

I imported the coordinates from an Excel table. They show as single points as intended. Now I want to add columns to the attribute table, but I'm not able to edit it. I wanted to import the following ...
7
votes
3answers
547 views

Sum integer values if values in another column are equal in QGIS?

I want a new column called "Summed" containing the summed value per "Populatie" name. How can I accomplish this?
7
votes
1answer
914 views

How to create predefined values in a field in PyQGIS?

I would like to make by programmation (python) the same thing than we can do directly in QGIS when you create a list of values for a field. I would like to create a new field and specify a list of ...
7
votes
1answer
14k views

Summarizing column in QGIS field calculator?

I have data with a column containing a number value, and I want to divide the value of each feature by the total sum of all the values in the column (to get a percentage). So I would like to know if ...
7
votes
4answers
4k views

Calculate polygon field based on neigboring polygon attribute

I have a vector shape with many different sized polygons each possessing an own class name (for instance "houses", "houses with offices", etc ...) I want to assign a new field to each polygon ...
7
votes
1answer
2k views

How to remove Commas from field values in multiple files?

I'm working in QGIS, presenting data in ArcMap, and Arc is having trouble with the attribute tables. I have a "species" column which lists the species found in that area and have added commas "," in ...
7
votes
2answers
3k views

Deleting all fields from feature class with ArcPy?

How do I delete all of the fields from a feature class in a simple way? I don't want to loop over the fields using the Delete Field tool because this method is very slow in ArcPy. I am using a ...
7
votes
1answer
210 views

Label attribute table column

I simply want to label a column in the attributes table as: "line 1", "line 2", "line 3" etc. I am sure there's an easy fix but couldn't find the exact solution from other posts. (using QGIS 2.18.7) ...
7
votes
1answer
97 views

Join shapefile and csv when identification uses two or more attributes

I have a shapefile and a csv file that I want to join. The csv file has: MSA identifiers County identifiers within MSA (so, across MSAs the county_id is not unique) a series of attributes (each ...