Field calculators (which are available in QGIS, ArcGIS-related products, etc.) can recalculate the values of a single field, on all, or selected records within a table based on a symbolic expression.

learn more… | top users | synonyms

1
vote
1answer
171 views

Comparing field values to update new field using ArcGIS for Desktop?

I am currently doing an analysis in ArcMap 10 using python. I have two shape layers, one is a point layer and the other one is a line layer. The point layer have attributes for point's unique ID, as ...
3
votes
3answers
193 views

Count the number of characters in a field (Python)

I have a field that contains street names and a second field called COUNT. I need to perform a Python field calculation on the COUNT field that counts the number of characters in the STREET_NAME ...
2
votes
2answers
60 views

How to flag parcels as being within stop type dependent distance of transit stops?

first question here! I have a parcel layer and a transit stop layer. The transit stop layer has different bus stops, light rail stops, etc. I want to add to my parcel layer attribute table fields ...
1
vote
0answers
63 views

How to measure area of polygons generated from gps data in qgis? [duplicate]

Somebody classified my question as a duplicate. But applying the answer doesn't work for me. Here is what I did: - I made sure that my layer is in a projected coordinate system (UTM30N, WGS84) - I ...
2
votes
1answer
195 views

Using update cursor on a field with a domain

I have been replacing field calculations with python update cursors in many of my work flows and today I ran into a problem. The fields being updated have an attribute domain. so now, when I ...
0
votes
3answers
295 views

Why does CalculateField set values to <Null> when output extent is in a different coordinate system?

I'm quite new to ArcGIS, and now I have to work on a script that goes through a list of feature classes to: add a field to their attribute table and fill that field with a number that I retrieve ...
1
vote
2answers
223 views

Stop rounding values in Qgis attribute table

I am calculating the areas of my polygons in Qgis using $area and everything works fine until I click on "save". All my values are rounded to an integer. I tired setting the output field type to ...
0
votes
4answers
160 views

How can I calculate different polygons by different attributes?

I'm doing my master thesis and want to calculate different polygons (in QGIS 1.8 for Mac) in four different columns which I defined by different attributes. i.e. some of the attributes in the first ...
4
votes
3answers
168 views

Is there a way to close a geoprocessing operation when the dialog box has been hidden/pushed to the back of the window

Is there a way to close a geoprocessing operation when the dialog box has been hidden/pushed to the back of the windows? I ran a python process as VB Script and when the error message appeared I ...
0
votes
1answer
1k views

How to search text string and select item in QGIS?

I have a table attribute with complete roads name. I have to search items by digiting a part of the road name and I need to colour all the items selected. eg: ROAD NAME: / road 01 / road 02 / road 11 ...
1
vote
1answer
116 views

How to write a expression in field calculator for finding $X and $Y?

I'm trying to calculate the lat/long of points using the Q GIS field calculator.Nathan W suggested to First, save the layer as WGS84 and import it again. Then in the field calculator you can use $x or ...
0
votes
1answer
75 views

Table calculation in QGis

I have a shape file with the attribute "yield". I need to know the math difference between yield (id1) and yield (id2)...then yield (id2) and yield (id3) and so on... I hope you understand what I ...
1
vote
1answer
1k views

ArcGis File Geodatabase with Null values (Field Calculator)

I want to use the field calculator to get the sum of a couple of columns. The problem is that some of them has Null Values. I am not able to find a solution. I tried this Python functions: stack( ...
0
votes
1answer
120 views

Trying (+ failing) to use a Function in Field Calculator

I'm trying to populate a field using a function. When I run this in Pyscripter, it works fine: d = {} # Function # def find_dups(val): d[val] = d.setdefault(val, -1) + 1 return d[val] # ...
2
votes
2answers
2k views

Using Value from Iterate Feature Selection to Calculate Field in ArcMap 10.1 ModelBuilder

I have two polygon feature classes, an alignment layer and a parcels layer. I am trying to use ModelBuilder to create a tool that will do the follow: iterate through groups in a single field of a ...
2
votes
1answer
198 views

Need a Python field calculation that works like the DatePart( ) VB Function

I have a field called Abandoned Year (short integer data type) that I am trying to populate with a four digit year from a column called Decommission Date (Date data type). I have done this in the ...
0
votes
1answer
276 views

How to calculate the area of the convex hull of a points layer

I have a shapefile in QGIS that I have created by importing a CSV of points, using Points2One to convert to a shapefile and then importing the shape. I am now trying to calculate the are of the shape ...
2
votes
2answers
537 views

Why is QGIS Field calculator button greyed out?

I'm using QGIS to attempt to calculate the area enclosed by a set of points that I have capture used a GPS device. I have imported the coordinates from a CSV but when trying to open the field ...
2
votes
2answers
303 views

Can anyone tell me why my field calculator is returning this error?

All I am trying to do is pull into a text field, a section of another text field via: fieldB = !fieldA![some_index:other_index] However I keep receiving the error below and I can't figure out why. ...
0
votes
0answers
44 views

( how to use Field Calculator to count number of duplicated recordes at another field? [duplicate]

How To Use the Field Calculator python script to count the number of duplicated records of a field "A" and get the count at another field "B"
1
vote
1answer
70 views

How to move a value from field1 to field2 using Field Calculator?

Hi I would like to move value in field1 to field2. Purpose is to after that delete the column 'field1' to get a better column naming standard /Jan
2
votes
1answer
67 views

using “abs()” function in QGIS field calculator?

I'm pretty new to GIS in general and I'm trying to take an absolute value of the difference between two fields in field calculator when creating a new field, but using ABS () returns an invalid ...
5
votes
3answers
1k views

calculating a field in which null values may be present

I would like to calculate a field (short integer) using other fields (short integer) present in the table. In some cases these fields may have null values for one or more of the fields. For example, ...
1
vote
1answer
101 views

How to reach a field value of a record in field calculator in ArcGIS 10.1

I have two fields showing number of people in two age groups "young" and "old". these people also live in a cell (point) whose distance to a specific facility is calculated. then I categorized these ...
1
vote
2answers
314 views

How to write a QGIS regex for rounding to two places after the decimal point?

In QGIS field-calculator round() is not working in QGIS 1.8 so I try to do the following with a regex: I'd like to keep the first two places after the decimal point - where do I go wrong? ...
0
votes
2answers
123 views

Stacking attributes in a text field

I am trying to stack my text in an attribute table using the field calculator, but it does not seem to be working. My field name is: Facilities. My attributes are in this format: Public ...
1
vote
2answers
463 views

ArcPy Field Calculation with special characters

I'm trying to calculate a string field, using "µSv/h". Running this in the manual field calculator works just fine, but I've tried this in the Python window in ArcMap as well as the IDLE, but both ...
1
vote
4answers
2k views

Field Calculator: Add “0” to the front of all values in a column

I have a table for each state with Zip Code values. The 5-digit Zip Codes that start with "0" have been reduced to 4-digits. I cannot figure out how to add a "0" to the front of all the values in the ...
0
votes
0answers
222 views

python script to calculate and return values based on several conditions

I need to calculate and return the value "continuous" to those records in a polygon feature class with species records aggregated to a UTM grid considering the attributes are species name, grid code, ...
2
votes
1answer
100 views

How to convert QGIS Field Calculation to ArcGIS?

I have a field calculator expression I use in QGIS to generate unique IDs that are sequential, but start with a text string. I now need to perform the same thing in ArcGIS, but I am unsure of how to ...
2
votes
2answers
195 views

How to calculate land cover inside the buffer zones?

In one Shape file I have created 1200 buffer zones Around coordinates. I created a field and calculated the buffer zones area in hectares. Then I clipped different landcover layers to the buffer ...
2
votes
2answers
519 views

Field calculator or update cursor?

I have a feature class in which one field (let's call it "Field_A"), as yet empty, is to be populated by the contents of another field ("Field_B") multiplied by a certain number (I'll call it the ...
1
vote
1answer
76 views

How to fill inn A, B, C …Y, Z, A, B, …Y, Z, A, B, and so on? [duplicate]

as a second part of a problem i am trying to solve. I need help to figure out how to fill in serial letters.. Starting at A.. going to Z and starting over at A again.. I have a tabel with numbers ...
5
votes
4answers
710 views

How do I fill in serial letters (AA, AB,AC…,BA,BB,BC…ZZ) to a shape?

(I am using ArcGIS software, ArcMap...) MY PROBLEM I have a shape file containing points. The shape file contains 3 columns named FID, Shape* and Label. In the column I want to fill in AA, AB, ...
0
votes
1answer
726 views

How to calculate polygon areas in acres or square miles instead of feet?

I have a layer in State Plane NAD83. When I use "Vector|Geometry Tools|Add/export geometry columns" or Field Calculator they both create the area in feet. What if I want acres or square miles? Thanks ...
6
votes
3answers
2k views

How to replace non-English characters in attribute tables using Python?

I have a few shapefiles where some of the attributes contain the non-English characters ÅÄÖ. Since some queries doesn't work with these characters (specifically ChangeDetector), I tried to change them ...
1
vote
2answers
142 views

How to get a string from a Double with a fixed number of decimals?

I have a featureclass (in a File Geodatabase), with a particular field of type Double. I want to copy it over to a text field, so that only 3 decimal places are shown. For example: 34.78902345 ...
2
votes
2answers
251 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 ...
0
votes
0answers
29 views

Exporting QGIS attribute table to excel [duplicate]

I have a million rows in the attribute table, with lat/lon columns that I want to export to Excel. Selecting all the rows causes QGIS to crash. Is there another way to do the export? The million rows ...
1
vote
1answer
554 views

How do you calculate a column value based on the value of another column?

I am trying to select data based on whether it starts with certain characters and then update a field. For example if [Asbuilt] starts with "WL" then do something. Here are the two methods I have ...
6
votes
1answer
4k views

Calculate area within Python script in Arcmap

I am trying to calculate the area of a polygon within my Python script. I create a new polygon from merging two together, and I'd like to add the area of the resulting polygon to a field in the output ...
1
vote
2answers
402 views

area values determined with field calculator become null when saving

using field calculator in Qgis 1.8.0 to get the area, it shows just right at first but when I save it, the values become Null. help please
3
votes
4answers
1k views

Why does Field Calculator return 0 values when decimals are expected?

I realize I posed this question, and got answers, several days ago (see (Field calculator error)) , but none seem to really be working, and so am posing again. Below are two screenshots that show the ...
3
votes
0answers
289 views

Field calculator error [duplicate]

NOTE: This problem is similar to one that was answered here: Why does Field Calculator return 0 values when decimals are expected? I'm relatively new to python, and am trying to run a simple field ...
3
votes
2answers
385 views

QGIS Field Calculator Results Removed When Saving Edits

Mac OSX 10.6.8 QGIS 1.8.0 : Using the field calculator from the attribute table, the $area of each feature is shown nicely in the table until I try to save it, then all the values are replaced by NULL ...
0
votes
0answers
62 views

Replace Null Values Field Calculator [duplicate]

I am using ArcGIS 10 and have a polygon shapefile in which many of the numeric fields are Null. The polygon shapefile in question is produced by joining a polygon shapefile with a point shapefile and ...
2
votes
1answer
393 views

Am I over-complicating adding and then calculating fields? Suggestions for a better way? (Python)

I'm attempting to re-position a question I asked yesterday here. I am starting to think that the way I wrote my code just isn't the best way. Am I overcomplicating things? I know for a fact that ...
2
votes
1answer
998 views

Incorrect field name resulted in RuntimeError: ERROR 999999 (Also, better code for adding and calculating fields)

This is the bottom half of my code (and it's been edited somewhat to share publicly). The code works perfectly fine when the fieldList has only three fields in it, but when I populate it with all 108 ...
2
votes
1answer
280 views

Calculate field result is float with Arc tool, integer with arcpy script

I am trying to calculate a field for some points within a python script using arcpy functions. (This is calculating the percentage visibility from a cumulative viewshed, if that matters.) # Process: ...
0
votes
5answers
3k views

Changing null value to specific numbers in ArcGIS for Desktop? [closed]

I have a Excel file showing annual precipitation and I add it on arcmap. When I tried to check it's attribute table the field calculator is passive. I want to change all the Null value to specific ...