The Stack Overflow podcast is back! Listen to an interview with our new CEO.

Questions tagged [fields-attributes]

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

Filter by
Sorted by
Tagged with
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 |...
22
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 ...
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 ...
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 ...
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 ...
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 ...
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 ...
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 ...
6
votes
2answers
830 views

Modifying width and precision of database using QGIS?

I have a database in txt format made of several columns of real numbers. Two column are integer, 17 are real (rounded to the first decimal) and 17 are real rounded to the second decimal. If I import ...
3
votes
1answer
7k views

Exporting QGIS contour attributes in DXF file?

I have a .tiff data file that generates contours in QGIS. I save it as .dxf. The contours don't have any attributes or data. That's bad, because I want to make a 3D landscape in Revit using the ...
2
votes
1answer
2k views

Building raster with multiple attributes based on 3 input rasters?

I am trying to make a new raster based on three input rasters which have the same cell size and the grids align perfectly. I now want to construct a new raster, which for each cell, has three ...
1
vote
2answers
4k views

Summarizing data using ArcGIS Desktop?

I am relatively new to GIS and am facing some difficulties trying to summarize/pool data together. I've attached the file to make it easier. FID_pc11_1 (Refers to postcode identifier) and count ...
62
votes
3answers
64k 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 ...
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 ...
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 ...
4
votes
3answers
1k views

Converting double field to integer in database view so ArcMap query layer can use field as unique identifier

I have a field in a table that is a double data type, but the values are actually integers. The table is from third-party software, so I don't have control of the field data types. I'm attempting to ...
6
votes
4answers
19k views

Python Script to Add Fields to Feature Classes

I have to try to add a field called 'Name' to a bunch of different feature classes using python, and then access the name of the feature class to fill in the field. I have no idea how to even start ...
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 ...
7
votes
1answer
917 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 ...
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 ...
6
votes
2answers
3k views

Choosing Shapefile attribute data type to use?

I am trying to figure out when to use (in the Data Type of SHAPEFILE PROPERTIES) - TEXT - SHORT-INTEG - LONG-INTEG - FLOAT AND DOUBLE. I am using ArcView 9.3 and I know when it is all text or use ...
1
vote
1answer
14k views

Changing field formats in ArcGIS geodatabase? [duplicate]

I am working with data in an ArcGIS 10.1 geodatabase. I wanted to complete the simple task of taking a ten-digit ID field that is currently in String/Text format and create an identical field in Long/...
2
votes
3answers
2k views

Adding many columns (to many layers) using QGIS?

The label toolbar uses fields in the attribute table of vector layers to fine tune labeling (Data defined labeling). That's the main reason i'm looking for that, but it may have more applications. I'...
1
vote
2answers
403 views

Getting attribute data from one dataset to another

In the image below you can see two shapefiles: NYC building footprints (outlined), and underneath a PLUTO shapefile rendered with a categorized blue gradient using the "Floor Number" column. The ...
6
votes
3answers
313 views

Is it possible to have the attributes fields already filled from the previous object?

I need to create a lot of points with lots of attributes, but most of the fields are the same, so I don't want to edit all the fields all the time. Is there a "remember previous fields" function ...
5
votes
2answers
7k views

Merge lines with the same 'name' attribute on QGIS?

I have a shapefile with a few thousand lines, each is a street segment. I'd like to merge all features with the same 'streetName' attribute into a single attribute. I only really care about the name ...
4
votes
3answers
2k views

Copy geometry from one layer onto attributes of another?

I have two polygon layers, A and B, that have the same features but totally different attributes. I want to use the attributes from layer A, but I want them to have the more accurate geometry from ...
3
votes
1answer
2k views

How to style a vector layer in QGIS using hexadecimal color code stored in attribute?

I have a polygon shapefile storing hexadecimal color codes in a specific attribute. gid | label | color ---------+-----------+------------ 1 | Crops | #FF5F2C 2 | Forest ...
2
votes
1answer
4k views

When aggregating points by polygons with sp::over function, how do I include attribute data from both the points and polygons? [duplicate]

Data: Zipped ea.ml1 shapefile can be found here, and the country outline can be downloaded here at the GADM site. I've been using the Ethiopia ESRI shapefile. Branch locations are here. I have a ...
1
vote
3answers
4k views

Changing field type with ArcPy?

What I need to do is change data type of a field of a table or feature class. If there are some data, then I need to transfer it, if its possible, if not possible then just set null for that data. I ...
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 ...
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 ...
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 ...
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 ...
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 ...
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 ...
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 ...
6
votes
3answers
4k views

How to collect data via WFS and Popup

I have a map with a WFS-Layer and I am able to add Polygons to my data stored in a PostGIS-database, served with GeoServer (OpenLayers, GeoServer 2.1.4, PostGIS 2.0 for PostgreSQL 9.1).) How can I ...
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 ...
5
votes
2answers
918 views

Creating numpy.array with variable number of fields to test arcpy.da.ExtendTable performance?

There was anArcPy Café blog posting entitled Adding Fields: Performance Tips which advocated: Two approaches to help increase performance when adding numerous fields to a table or feature class. ...
4
votes
1answer
1k views

Renaming field in attribute table via PyQGIS?

How can I rename a field in PyQGIS? I tried: for field in layer.pendingFields(): if field.name() == 'old': layer.startEditing() oldname = field.name() field.setName('new'...
4
votes
2answers
2k views

How to delete empty fields from a Shapefile with QGIS or ogr2ogr?

I have a Shapefile with a lot of empty columns but many of them are empty. Using QGIS or ogr2ogr, how do I remove all attribute columns where everything is NULL?
4
votes
1answer
2k views

Select by attributes within the fiona Python module

Is it possible to select polygons from a shapefile based upon their attributes using the Fiona Python module? I can't seem to find anything in the docs, but it seems like a strange thing not to be ...
3
votes
1answer
2k views

QGIS Not Importing ExtendedData from Self-Exported KML?

I've been scouring the internet for the past few hours, and I just can't seem to figure it out! I am using QGIS 2.4.0-Chugiak. Here are my simple steps: 1) I create a new ShapeFile (Type: Polygon) ...
2
votes
1answer
537 views

Defining fields and adding features to output layer using QGIS?

I have two input vector layers (one point and one line layer). I loop through every feature in the input-line-layer and calculate some things (with help of the point layer). What I am trying to do ...
2
votes
1answer
1k views

Automating Atlas to create maps for all Attributes

I'm using QGIS 2.18 (Las Palmas). I have an attribute table with 75 municipalities and around 50 attributes. I would like to creat a map for each of the attribute (always showing all of the ...
2
votes
1answer
5k views

Assigning field value based on location without join

I'm interested in updating a field in geodatabase feature classes based on their location in relation to another feature class in the geodatabase, but without having to perform a join (and therefore ...
2
votes
1answer
884 views

Modifying feature attributes of a shapefile in geotools

I have a shapefile with an attribute I want to compute programmatically in Java for each feature. I have found a lot of documentation on how to read and create shapefiles with geotools (http://docs....
1
vote
2answers
682 views

Duplicating layer and applying filter using PyQGIS?

Is there a way, using Python, to duplicate a layer in QGIS as many times as the single occurrences of a variable contained in a field and with a filter applied on the duplicated layer based on the ...
0
votes
1answer
5k views

Calculating new field to represent sum of values in existing field in ArcMap?

I need a way of calculating the total sum of the values in an existing field and displaying this value in the corresponding cells of another field. In other words, I want this second field to display ...