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

2
votes
1answer
31 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
26 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
40 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
55 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
22 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
15 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 ...
1
vote
2answers
40 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
99 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 ...
1
vote
1answer
46 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
83 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
36 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
118 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
76 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
75 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
139 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
21 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
39 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
26 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
19 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
24 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
33 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
0answers
36 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 ...
0
votes
0answers
21 views

Python script to get count of features that meet a certain criteria [duplicate]

I am in search of a Python script for use in the ArcGIS Field Calculator to return the number of features that meet a certain criteria. Here's where I am getting stuck: def ...
0
votes
1answer
56 views

Is it possible to have auto-updating area fields?

I'm using QGIS 2.4.0 and I've noticed some problems with the derived area and the $area field. Firstly, I have a polygon which is a filled ring, inside another polygon. The derived area, and therefore ...
0
votes
0answers
99 views

Python script to get feature count in a feature class that fall in a specific range

I need to write a Python script to be used in the ArcGIS Field Calculator that will return a feature count for values between a range defined by the values in two other columns. Here is a graphic ...
-1
votes
0answers
12 views

Unique ID's for ObjectID [duplicate]

So basically I have a raster image that has been grided to make digitizing more organized.I used a fishnet,and the grids are numbered in the OID field from 1-304. I wanted to create another field ...
-1
votes
0answers
35 views

Creating a unique ID for Object ID's

Does anyone know how to create a unique ID, in another field, for the existing oblect ID's? For example the Object ID is "1" I simply want to make it"1A". I am looking for a script or code that would ...
1
vote
1answer
49 views

Calculate field in model builder using file name

I have browsed answers to similar questions but I still cant figure it out. I have created a new field called "namemonyr" in all of 646 shapefiles. I now want to populate that field using ...
2
votes
1answer
45 views

Add or subtract days to date field using the field calculator

I am using ArcGIS 10.1 I'm not a programmer I want to use the field calculator to add 4 days to the current date if the status is "delivery" or subtract 5 days if its status is "order" this ...
1
vote
0answers
38 views

QGIS field calculator expression: selecting min/max values within field groups

I am new to using QGIS (previously used Arc) and trying to get my head round the expressions and Python. I have series of polylines representing routes and require the linear distance from the ...
1
vote
1answer
47 views

How to calculate distances in QGIS field calculator?

So I'm using qgis 2.6.0 and I have a csv (converted into a .shp) with two geometry columns, I want to create a new column with the distance between the two geometry: shot.lat shot.lon haul.lat ...
2
votes
1answer
38 views

Converting Aspect degree to westness

I have extracted Aspect values in degree from DEM in ArcMap 10.2 full license. I want to investigate effect of Westness in my model so I was using conversion formula of Folded Aspect : ABS (180- ...
3
votes
2answers
128 views

Using Field Calculator to append attribute

I have a field containing the file names for photos. I need to add the folder location to the beginning of each file name. Anyone know the code for doing this in Field Calculator?
1
vote
1answer
58 views

Calculate value from an equation using Field Calculator Python/VB Script

I wanted to calculate a result value from 3 fields using an equation. VBScript or Python codes are also accepted..:-) the equation is RESULT= [(R^2/3)(S^1/2)]/n..
1
vote
1answer
54 views

Using if else statement in Python Parser of Field Calculator in ArcGIS for Desktop?

I need help in writing the python script in the field calculator. I have three fields namely: CODE COMPLEX Map1 Map1 is an empty field that I want to populate. I have a number of conditions to cater ...
1
vote
3answers
119 views

Field Calculator - How to evaluate and sum multiple fields?

I'll do my best to describe the problem - my main issue isn't so much the python code but rather the logic I'm using. The file I'm working on is a polygon shapefile with forest attribute data. In the ...
0
votes
1answer
80 views

Calculate Field based on two fields using python

I'm trying to calculate new values for a field based on two other fields. In VB I don't have any problem, but I need to use python to publish my gp service.
2
votes
1answer
96 views

How to create a Qgis python script to manipulate fields with some parameters?

I'm just beginning with QGIS. I have a shape file with 10 fields field1, ..., field10, and many thousands of data. I will like to automatize the next sequence (in a python script or a model): load ...
1
vote
1answer
35 views

Categorizing GPS data based on cumulative time using ArcGIS Desktop?

I have GPS data which includes “Lon”, “Lat”, and cumulative Time from 0 (sec) as fields. I want to add an integer variable new field, “Trip,” which starts from zero, and is incremented by one after ...
2
votes
0answers
51 views

How to add column to attribute table using field calculator with $length function?

I used the following code to add a separate column to the attribute table with the length of features. from PyQt4.QtCore import QVariant from qgis.core import QgsField, QgsExpression, QgsFeature ...
1
vote
1answer
63 views

Remove Leading Zeros with QGIS Field Calculator

I'd like to take this attribute value: "MAP_PAR_ID": "0160011000", and populate a new field with "16-11". This works: concat(substr("MAP_PAR_ID",0,3), '-', substr("MAP_PAR_ID",5,3)) but i need to ...
0
votes
1answer
60 views

Using Field Calculator to fill out a list of unit numbers

I am adding address points for individual units in trailer/RV parks and I would like to be able to use the Field Calculator to assign the unit numbers. Is it possible to tell the Field Calculator a ...
1
vote
1answer
68 views

count how many times an attribute is repeated, using “field calculator”

I'm using Arcgis 10.2.2 there is a way to count how many times an attribute is repeated, using the "field calculator" to make a selection after example of repeating more than 20 times
2
votes
1answer
42 views

Referencing fields in code block of Field Calculator in ArcGIS for Desktop?

I'm trying to use values from a field to fill a new field with a truncated version. The 'str.rindex' function is working out well, but I can't seem to figure out how I'm supposed to reference the ...
1
vote
0answers
30 views

Field Calculator QGIS: CASE WHEN [duplicate]

at first, sorry for my English. I'm using Google translator. I have a .shp file with attribute table. Like this... -- A -- -- B -- -- C -- QString Double Double Data ...
3
votes
2answers
69 views

Averaging XY data for locations in QGIS

I wanted to find out mean of the selected point using QGIS. I tried out selecting using attribute table but could not find an option for mean in field calculator. I have attached a screenshot with ...
1
vote
2answers
125 views

Field Calcuator to add percent using Python

What might I go wrong here is that I am trying to add percent. I use the Field Calcualtor and it keeps getting an error. I am opening the Table to add a field named Percent and then type this: ...
1
vote
1answer
82 views

How to work with accentuated strings in Python scripts in ArcGIS Desktop Field Calculator?

` pre-logic: def myCalc(name,nameVal): if (name == nameVal): return 1 else: return 0 var_name= myCalc(!Epulettipus!,"Lakóépület") ` This doesn't work with accentuated strings. (But ...
0
votes
2answers
104 views

Writing Python script in Field Calculator in ArcGIS Desktop?

I'm a programmer, I have programmed in C#, Java, but not with Python. And I'm not a geographic worker. How can I write a python script into Field Calculator to be able to check the other column value. ...
1
vote
1answer
67 views

Concatenate fields value excluding empty values

I need to concatenate the value of two fields excluding empty values, using Field calculator. The fields are: AREA_HI and AREA_LO I have tried using a Python script but ArcGIS returns an error ...