Field calculators (available in QGIS, ArcGIS Desktop, etc) can recalculate the values of a single field on all, or selected, records within a table using an expression.

learn more… | top users | synonyms (1)

3
votes
2answers
81 views

Field calculator if and elseif statement with <Null> values in ArcGis 10.1

Trying to figure out how to get this "Headwater" column to indicate "Yes" (or 1) if the value of "NextDown_Copy" is "" and "No" (or 0) if it has any other value (eg. 7100381010). I attempted to ...
1
vote
1answer
53 views

Virtual fields are lost when duplicate layers

I've just upgraded to QGIS 2.12.3 - and hoped that the issue which was really time-consuming in 2.12. <3 could have been solved ... On duplicating layer - with tons of joined tables and virtual ...
0
votes
1answer
49 views

QGIS loop/iterator with python in function editor (field calculator)

I am trying to create a loop to rename the fields of my attribute table. The fields should start at 1 and increment by one until the end of the table (e.g. 1,2,3,4,5,...,n) my code on the python ...
6
votes
4answers
242 views

Need to find strings that contain the same word twice

I have attribute data with owner names. I need to select data that contains the last name twice. For example, I may have an owner name that reads "BENNETT MCCARL & ARNETTE BENNETT". I would like ...
2
votes
2answers
49 views

Field Calculator - conditional function and string variable?

I know this question has been asked before in different fashions, but I can't seem to get my python script to work despite looking at all the relevant questions I could find. I am simply trying to ...
6
votes
1answer
98 views

Join by attribute / field calculator SQL in QGIS

I have a layer with polygons (let's call it "woods") that is intersected by "n" line-objects ("roads"). Every road has an unique attribute roadid. I need to add ALL the roadid's (not only the first ...
2
votes
0answers
33 views

Finding and using mean and standard deviation value in field calculator

I am creating a field for a z-score of a particular attribute. This requires calculating the mean and the standard deviation for the attribute across all features. I've been using the statistics ...
3
votes
1answer
31 views

How to replace a directory using QGIS Field calculator?

I have a column called Hotlink full of incorrect directories and I need to edit them. They currently read C:/ABCD/filename.pdf and I want them to read C:/Maps/ABCD/ABCD/filename.pdf The script I'm ...
0
votes
0answers
10 views

Finding distance between consecutive points using ArcMap Field Calculator? [duplicate]

I am very new to ArcGIS but I am working on a data set consisting of GPS locations of radio tracked freshwater turtles. I am trying to find the distances between the points in order. Can someone ...
0
votes
0answers
19 views

Replacing multiple fields with Python [closed]

I have just started to learn how to use Python for ArcMap and am having some trouble with a task I have to do. The question is like so: Create a Field Calculation that will create a text value ...
3
votes
1answer
66 views

QGIS Field Calculator functions

Using QGIS 2.12.3, within the Field Calculator "Geometry" section, there are certain functions, such as "area", that also have a corresponding term beginning with a dollar sign, i.e. "$area". I don't ...
1
vote
1answer
31 views

Iterating through list of fields using field calculator?

import arcpy, sys, itertools arcpy.env.workspace = r'path to geodatabase' fields1 = ['gearqty', 'cnemarea', 'fzone', 'qdsq', 'tensmsq', 'crew', 'nanglers', 'port', 'totalquant', 'trip_days', ...
1
vote
0answers
32 views

Converting Atn function of VB Script for Python parser of ArcGIS Field Calculator? [closed]

I would like to convert the Atn function (which returns the arctangent of a number) of VB Script to Python but I cannot find exactly the same function. Any help? I want to convert the slope of ...
0
votes
2answers
41 views

Calculating percentages in ArcGIS field calculator gives TypeError: 'float' object is not iterable?

I am trying to calculate the percent AREA in each class. I have created a new percentage field and have tried to populate it using the following equation in python in the calculate field tool. ...
3
votes
2answers
46 views

Why is VBS If Then Label Expression not working?

I am trying to label a field based on other field. For [TYPE] = "PRIMARY", the [LABEL] is having this structure: "TAN80901B" For [TYPE] = "SECONDARY", the [LABEL] is like this: "TAN80901C/D20b" I ...
1
vote
1answer
20 views

Calculating average values of condition or receive values from a table for calculation in another table

I have a table with data (in this example the field "TSS"), a field time corresponds to the data for each point. I want to create a field with the mean values for each point all time values, without ...
1
vote
2answers
78 views

Calculate field more wisely

I first classified firstCol into groups and then I want to give the groups with different weighted values in another field, SecondCol. I will need to give different weighted values very often. I find ...
2
votes
3answers
87 views

If else if in ArcMap Field Calculator (Python)

Help! I think I am missing something that must be so obvious but I cannot figure out what I am doing wrong. Here's some background: I have one short integer field (MajAspNum) that has values ...
0
votes
0answers
22 views

Calculate field for each Feature Class in Dataset using Python and different arguments

I have Dataset with Feature Classes in it. I'm building this in ModelBuilder. I want to calculate new field (SMB_ID) depending on attributes for each feature class. I was trying to make it simple ...
2
votes
4answers
73 views

Calculate Length Totals in ArcGIS based on field values

I am having trouble finding the right words to describe this problem but here goes: I have 3 values (120,270,380) in my field called operatingvolt for every segment of conductor. Each segment of ...
3
votes
1answer
30 views

QGIS - Field Calculator: scale_linear gives unexpected result

When I try to use scale_linear, its output isn't as I expected. My values are from 1 to 16, so I set domain_min = 1 and domain_max = 16. I want to interpolate to interval from 1 to 4 so I set ...
2
votes
1answer
37 views

Rename cells in Attribute Table to 'XXX.$ID'

I feel like this should be easy to answer, but I can't get it to work for me. I need to edit the attribute table of a .gpx file before I load it into my GPS, in order to label the points. I can rename ...
3
votes
3answers
69 views

Can't replace attribute with field calculator

I have an attribute table where one of the columns (laeskaerm) has been edited/created by checkboxes on 2 different machines. Result: it contains both 1, 0, true, false and NULL I'd like to replace ...
1
vote
2answers
33 views

How to compute the distance from the current polygon centroid to another in QGIS field calculator?

There is layer with polygons. I want to save in new field distance of every polygon's centroid to centroid of one particular polygon. To do this I should write some expression like this: ...
1
vote
1answer
38 views

How to edit virtual field definitions in QGIS?

I have a virtual field in QGIS. The values are updates depending another column with a concatenate CASE statements. I would like to edit this statement but I cannot see it. I have attempted to use ...
2
votes
1answer
59 views

QGIS processing toolbox: fieldcalculator - update only selected features is not possible

I am working on a model where I need some calculations on only some selected features. In the normal fieldcalculator you can check 'only update ... selected features'. When using the fieldcalculator ...
2
votes
1answer
78 views

Using ArcMap Field Calculator to count number of identical values?

I have a file with an attribute table with data in 3 columns, and would like to use field calculator to populate a 4th column. The data is integer numbers between 0 and 56. I want the new column to ...
1
vote
1answer
20 views

Polygon Surface Area Calculator in different map projection(s)

I'm simply looking for an online tool or a utility to calculate the surface area of the same polygon (i.e shapefile) in different projection (projected and geographic projection system) systems. It ...
-3
votes
1answer
38 views

Calculating field gives invalid expression in QGIS?

I am a new user of QGIS and I want to add a new field in my attribute table named densite which can be calculated by POP(population) / Area, in Field Calculator, I wrote POP/Area no result !! invalid ...
2
votes
3answers
46 views

Add value to entire column in attributes

Is there a way to add a value to the entire column? I don't think i can use raster calculator because it's a text i want to add, the letter "B". Here is a picture. This is what happends when i use ...
2
votes
2answers
30 views

Using Field Calculator vb to check for name with /n in the string?

I am calculating values for a field (Score) based upon the names from another field (Modified). One name is "blaugh\nblaugh". Field Calculator keeps treating the name as having a new line command. I ...
-1
votes
1answer
21 views

calculating sq ft of an picture image with only a scale bar as reference

I have an architectural image of a building. However, I had to change the blueprint and extend the walls out further increasing the total sq.ft., and simply for the means of drawing out the new ...
1
vote
1answer
28 views

failed to Writing conditional (if/then) statements into Field Calculator of ArcGIS for Desktop using Python parser?

I wrote this following several examples but it is still wrong. I need to populate a new field based on 5 ranges of values. def marks(Wards for try.JHRatio ): if (Wards for try.JHRatio <= ...
1
vote
0answers
32 views

Calculate z score into new field in ModelBuilder?

I'm trying to calculate z scores for a given column. I am working with a shapefile, that contains fields like percent poverty, percent tree canopy and temperature. My ultimate goal is to add new ...
1
vote
2answers
66 views

“CountIf” or alternative function in ArcMap field calculator?

Within ArcMap 10.3 field calculator, I am looking to count the number of features in a column that match the current value, and output that count. Ideally, the output would look like this: Number ...
0
votes
1answer
58 views

How calculate sequential values based on group field?

In field calculator i calculate sequential values in field [ORDER_ID] What need change in script to calculate sequential values based on group field [GROUP_ID]. I select values manually and use ...
0
votes
0answers
37 views

Equations from tables and user input in ArcGIS Model Builder

I am trying to create a model in ArcGIS that makes use of a DEM and other user-input parameters in order to calculate the evapotranspiration at a hydrological basin. To be exact, the final output of ...
1
vote
0answers
52 views

Replacing Null values with field calculator

My goal is to use the field calculator to replace null values. I am trying to replace nulls in the ToDate_Time with the FmDate_Time. When I run the code below the results window says that it worked ...
2
votes
3answers
177 views

How to get around “The field is not nullable” error?

I have a shapefile of lines. I want the angle of every line calculated in a field. I am using the script below in arcmap, but when it encounters a line that is horizontal, it stops calculating any ...
2
votes
1answer
39 views

QGIS - Loading Features prompt

I'm currently working on a dataset with 3.8m records. I have a very simple expression to update a field that I want to execute using the Field Calculator, while having the Attribute Table open. Do I ...
2
votes
2answers
60 views

Problems with SQL expression formatting and calculate field management

I am trying to take the population census tract and calculate the percentage of population by each census tract in the field (Populati_2). To do this I'm creating a new field with the total sum of the ...
1
vote
3answers
49 views

Using Field Calculator to compare two fields in att table and returning if equal or not in ArcGIS for Desktop?

Using 10.2.2 I am attempting to compare two fields in an attribute table using the Field Calculator. I'd like to return a value of '0' if they are equal and a value of '1' if they are not equal. ...
0
votes
1answer
57 views

Calculate percentages with field calculator in arcgis?

I am trying to calculate the percentage of each the area of each polygon in the selected area. I tried using ( math.fsum(!shape.area!) / !PolygonArea! )*100 and other codes but I cannot make it work. ...
0
votes
2answers
33 views

update cursor based on location

I'm working on a python script for ArcGIS 10.2/10.3. What I want is to automatically fill in a field of a point layer based on the location of that point in relation to a polygon layer. Say I have a ...
1
vote
2answers
90 views

Update multiple fields/columns in QGIS

I need to update fields in attribute table of a vector using QGIS. I use field calculator for each field, but i have too many fields (and too many vectors also) and i need to program the task. The ...
0
votes
0answers
9 views

How to calculate area percentage from polygons from one shapefile within another? [duplicate]

I'm working on a project where I have to create python code that takes land-use data and adds a percentage field for each land-use category in a Census Tract shapefile. I've been trying to work with ...
0
votes
0answers
34 views

Creating IDs for multiple features in Python Parser of ArcGIS Field Calculator?

Does anyone know how to create ID numbers for multiple features using python? For example; (IDs being the object ID, Name and object ID being two different fields) Names //// IDs Street 01 River ...
0
votes
1answer
15 views

Clearing Calculate Value before Model Run in ArcGIS ModelBuilder?

I am using ArcGIS 10.2 for Desktop. I have a model which contains several branches, which branch should run is based on the results of an earlier stage in the model. If the first stage of the model ...
1
vote
1answer
74 views

Populating attribute table string field with values from long field using vbScript in ArcGIS Field Calculator?

I want to calculate the field "area_type" with text depending on numbers from the "Value" field. I have tried with the following VB-script in "Field Calculator" but am getting this error message: ...
1
vote
2answers
62 views

Using nested If statement in Python parser of ArcGIS Field Calculator?

I'm trying to use field calculator to assign values to a new field I created. I wan't to assign the value from the first field unless that field is empty, if it is empty use field 2, if that is empty ...