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)

1
vote
2answers
15 views

QGIS upper round in field calculator

I need to to in the field calculator the following calc: toint(Field1 / 25.0) but i need to round the result to no decimal places but upwards. Exmaples: If 17/25 result should 1. If 25/25 result ...
1
vote
0answers
21 views

Assigning score to raster based on cell overlap with other raster and field value

I have a set of rasters that I've assigned scores to individually (scored based predominantly on values of other fields). The scoring scale is the same for all rasters, but the factors that determine ...
1
vote
3answers
25 views

VB Script field calculator - error with conditional statements

I have limited VB Script experience, but have been working on the script below and keep getting errors, the most common being "expected identifier". Can someone tell me what I'm missing here? Dim ...
2
votes
4answers
33 views

Auto populate field with text using field calculator if/then

I've extracted values from a raster to a point file, but now I need a field with the text information from the raster attribute table that corresponds with the value. I've been trying to use the field ...
0
votes
1answer
39 views

How can I refer to two tables in ArcPy's CalculateField_management?

I tried to refer to the different table's fields just like I saw in How to Calculate Field in joined table using ArcPy? but it doesn't work. There are two tables in my example. I have created table ...
0
votes
2answers
32 views

What fields can the CalculateField_management expression parameter contain?

What fields can the CalculateField_management expression parameter contain? I mean the parameters can be the fields what are in the output table, or can they be a field of another table too? There ...
0
votes
0answers
22 views

How to use calculatefield_management with ArcPy and joined second table? [duplicate]

How can I use calculatefield_management with ArcPy if I have a joined second table? I want to go through the attached table's field and I want to get records where the certain fields is. How can I ...
2
votes
5answers
143 views

Field Calculator expression to replace string only if it occurs

I have two fields (STREET1 & AKA_STREET_TEST1). I'm having a problem creating a simple IF THEN Python statement in the Field Calculator box. I've been searching the threads for a similar ...
0
votes
2answers
35 views

Field calculator to copy numeric values from other fields

FieldA contains text: both numeric(123) and alpha-numeric(123a, 2-3, 3/2, '). FieldB is longstring. I want to use field calculator and codeblock on FieldB to bring from Field A only the numeric ...
1
vote
0answers
17 views

QGIS (2.0.1): Field calculator for length not working - values way too high

Same problem as another thread: Field Calculator returning incorrect length and area values Trying to calculate length of a line shapefile, and field calculator is returning values that are way too ...
0
votes
2answers
38 views

Large dataset, how to copy values between fields

I'm in this position: i have a feature class containing about 6 million entries. I made a summarize and and generated a new table. I joined the two tables and now I need to copy the values from the ...
1
vote
1answer
52 views

How to perform If Statement in Field Calculator of ArcGIS for Desktop? (Python or VB)

I've one field "MAXSPEED". I want a Field Calculation that will calculate an additional field ("noise"): If MAXSPEED > 40 then the term: (73.5 + Log ( 25 ) * ( [MAXSPEED] / 50)) should be used to ...
0
votes
0answers
22 views

How to use random number generator to select by attributes in ArcMap? [duplicate]

I am not familiar in using Python and random number generator. I was wondering how to select 250 rows/values from a column named "JUROL". Every value in that column is different and the column ...
0
votes
2answers
55 views

Editing tables in ArcGIS for Desktop with Python Parser of Field Calculator?

so I'm trying to edit a table so that the name column will not contain spaces. I just don't know how to write the Python script that should go with it. This is what I have for the Python script ...
1
vote
1answer
43 views

python expression convert field to string and format with leading zeroes

I would like to create an expression using the field calculator in ArcMap to be able to convert an Int field to a string and add leading zeroes. I am able to do it in a python window with an example ...
3
votes
2answers
163 views

Problem using field calculator to add numbers in new field with preceding zeros

I wish to add a field in an attribute table that should work as a georeferencing key. It needs to take into consideration values from a series of fields. The last field is a housenumber and it ...
1
vote
1answer
45 views

Use field calculator to reclassify values from three different fields to populate a new field AND determine overlap with different raster

I want to reclassify values of 3 different fields AND determine if one of those fields is located inside a different polygon to populate the values of my new field. Everything is raster. I created a ...
2
votes
2answers
78 views

Assign field values (double) based on values of other field (string) using field calculator

I want to assign numbers to a field, WScore (double), based on field values of Soils (string). They are in the same table of a raster. I'm not trying to add text to a double. What I want to do is ...
0
votes
1answer
52 views

Basic Python Reclass question in Field Calculator

I'm trying to reclass values in field calculator using Python. I want any value >= '5' to remain the same (return same value). Anything else to be = '0'. Yes, DIST_EDGE are numbers. I'm getting an ...
3
votes
1answer
91 views

Calculate average value for each row

The picture is an example, but the method would be the same at mine bigger dataset. So i have some parcels with each a ID value and some fields. such as field 1, field 2, field 3, fieldd 4,... with ...
2
votes
2answers
59 views

select parcels in polygons and add fiels depending on the polygons

I have a lot of feature classes (results of service area with different polygons (0 to 10/ 10 to 20/ 20 to 40 and 40 to 60) (figure 1) Also i have a shapefile with a lot of parcels (figure 2) ...
1
vote
2answers
99 views

Calculate Fields from 3 different fields using ArcGIS for Desktop?

I'm using a shapefile of different vegetation and land cover types and I want to generalize to a simpler classification (ie. I only need to differenciate between young and old forest and open land, ...
1
vote
1answer
68 views

Extracting data from Address field using ArcGIS for Desktop?

I am fairly new to using python in field calculator and could use some help. I want to populate SitusRdType with RD or AVE or LN or ST or DR depending on the road type. I also want to just have the ...
1
vote
1answer
32 views

How to use field calculator in QGIS to calculate new coordinates, and use that new columm to geolocate a layer's points

In a separate question, at How to shift a CRS by an observed offset, I asked about shifting a CRS to align the problems aligning data points with a satellite image obtained from OpenLayers. (They ...
2
votes
1answer
29 views

Add a certain number of days for a date field

I have one field for a permit decision date, and then I have another field for 180 days from that permit date. The permit date field has data entered, but the 180 day field I would like to calculate ...
0
votes
1answer
53 views

Field calculator (using ATAN)

How do I input the arc tan in the field calculator given the values of the fields to get the desired answer, I compare the answer of the manually computed arc tan value and the Atan Spatial Analyst ...
1
vote
0answers
34 views

Passing Value for Dictionary Look Up in Field Calculator fails [closed]

I've a field calculator that I am trying to use that uses a csv file to look up appropriate value based on key that is passed provided to the function. As provided below, the only values calculated ...
1
vote
0answers
32 views

Field Calculator stopped working

The field calculator seems to have stopped working for one of my attribute tables (it works fine on others). No matter what I get it to express (I've tried simply 2*2, just as a test) it just produces ...
2
votes
1answer
50 views

Subtracting columns (that include null values) in ArcMap Field Calculator

I’m desperately trying to run a very simple command where I subtract one column with others. However the problem is that some rows have NULL values, therefore the result of subtracting is also NULL. ...
2
votes
2answers
52 views

Add both string and automated numbers in series to attribute table using field calculator

I would like to fill a column in my attribute table with an string that ends in a numeric value. Example: Object001 Object002 Object003 I would like to automate the process of filling in the ...
1
vote
1answer
44 views

how multiply a ranges of values for other value on python

I need multiply ranges>1.5 and <=4.5 * 9, but I am new in this type of language. please help me. def CalcD(Level_water) if Level>1.5 and <=4,5 * 9
1
vote
2answers
96 views

Using Python For a Field Calc

In AcrMap 10.2 I'm trying to add a field and run this script in Field Calc: !shape.isMultipart! to see if I have any multipart lines. I keep getting geoprocessing failures. I am clicking the ...
0
votes
0answers
31 views

How do I auto-populate more than one other attribute field with values based on the value of another field within the same record?

Based on value selection from one attribute field, would it be possible to auto-populate many fields within the same record with predefined values either from a range of values within another field or ...
1
vote
0answers
25 views

Trying to export stacked text to CAD using ArcGIS 10.2

I've been experiencing some unwanted results when trying to export stacked text to CAD using ArcGIS 10.2 for desktop. With the Export to CAD tool I can easily export polygons. However, I'm also trying ...
3
votes
2answers
63 views

basic problem using division in field calculator

This is a very basic question, but I can't figure out what's going on. I've got election results I'd like to simply display as percentages rather than vote totals, which should be as simple as ...
1
vote
4answers
113 views

Calculate Field with Python Issues (If statements)

I don't know a whole lot about python and scripting, so I was hoping somebody could give me a couple pointers on fixing some code. I am trying to calculate a "final results" attribute field. The ...
0
votes
1answer
56 views

Join and Field Calculator

I made a Join between a shape and a dbf, and now I want to calculate some data from the table that came as a result from that Join. Everytime I try to run the Field Calculator it says there's an ...
3
votes
1answer
112 views

Using arcpy and script toolbox to add the date to a attribute table

I would like some information on how to add a date to an attribute table, by adding a user specified date in a script tool that will update the polygons attribute table. In short I have two polygons ...
0
votes
1answer
53 views

What is expression for finding perimeter in ArcPy and Field Calculator?

What is the correct format for finding perimeter as an expression for arcpy. I was able to use expression !shape.Area! to find the area of my polygon. However when I use the expression ...
1
vote
2answers
141 views

What's wrong with this VB Script code for the field calculator in ArcGIS 10?

I am trying to use one field's contents ([Condition]) as a condition for populating another field ([Intact]). I try to run the following code in the Field Calculator, but it never works (and is not ...
2
votes
1answer
83 views

ArcMap Python Question: Trying to Field Calculate Slope Percent in to Text

I have a layer of polygons that I spatially joined to a raster to point layer of slope percents. My polygons now have the percent of slope in a field called Avg_point. I want to use the field ...
3
votes
1answer
87 views

How to use QGIS field calculator in python?

I would like to use QGIS Field Calculator in Python to update the existing column based on certain conditions? How can I do this?
1
vote
2answers
161 views

Syntax error from Python parser of ArcGIS field calculator if then?

Using ArcMap - I would like to calculate one field based on the value of another field. I want to Update the field 'Date_Class' based on the value in another field 'MIN_YEAR_B'. I was trying to do ...
0
votes
1answer
33 views

Many ELSE statement in Expression in QGIS (2.6) [duplicate]

is it possible to have more than one ELSE in the CASE WHEN statement in the Expression builder in QGIS? For example: CASE WHEN "population" > 5000 THEN 'big' ELIF WHEN "population" > 1500 THEN ...
0
votes
1answer
53 views

Building heights above DEM through field calculator

I have a series of building polygons which I would like to convert to a raster illustrating their height. I have the building heights but not their elevation above sea level datum. I have the ...
0
votes
1answer
35 views

How to populate new field according to string content of another field using VB script?

I want to populate a new field called Letting according to the string value found in another field. If 'ASP' or 'Q' is in field ExternalRE then I want 1 in Letting, everything else to be 0. Here is ...
1
vote
1answer
28 views

ERROR 000989 Issue with Python Script and Field Calculating distance between two long lat points

very new to scripting and I have been struggling with my script for a while. I'm not sure why it doesn't work in field calculator. I am trying to calculate a list of distance between two long lat ...
0
votes
1answer
27 views

Copying the numeric portion of an address to a new field

I'm attempting to copy just the numeric portion of a street address into a new table using the Field Calculator in QGIS. The expression I'm trying to use is: left( "SITE_ADDR", strpos( "SITE_ADDR", ...
1
vote
1answer
37 views

What is the expression for getting a subset of characters in QGIS Field Calculator?

I have a column of 10 character names e.g. L3NAM1988K. How can I delete the first 5 characters and the last 1 character using an expression in the QGis Field Calculator?
1
vote
1answer
51 views

Use value of Field in Calculation in Modelbilder

In Modelbuilder I have set up a model, where in one step I do a "Calculate Field" like "round((!OID!-1- %MyField% /15)/452,1)+1" . For the calculation i use the value of %MyField%, which actually is ...