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

0
votes
1answer
52 views

What is the syntax for Python 2.7 to permanent display in percent in a field column?

What is the syntax to build to calculate field, for example, Acres to Percent? 841173.00 to 82 % What I want the field column in Percent to be display numbers with percent with the alignment to ...
2
votes
1answer
31 views

Randomly choosing one from multiple fields in Field Calculator of ArcGIS for Desktop?

Using the Field Calculator in ArcGIS for Desktop, I want to randomly choose one field from a list of 10 fields (strings). The Excel equivalent, which is working, is: =INDEX(A2:J2;rnd()*10+1). How ...
5
votes
3answers
73 views

Calculation based on features in shapefile

I hope I get the terminilogy right! Correct me if I mess something up. I need to perform some calculations for a scoring system for different habitat types. The Problem is that I have two different ...
6
votes
1answer
144 views

How to classify time periods in a new field, using Python?

I have a datetime field (Horario) in my feature class, showing only the time. Although the date doesn't appear, it seem to be stored automatically as 30 Dec 1899, I'm not sure why. I want to use ...
0
votes
1answer
25 views

Calculating Area of Raster Classes

I have a raster in a GRID format that was created by Image Classification. The GRID is projected in StatePlane meters, but I would like the area in square feet. I'm assuming I will need to use the ...
1
vote
5answers
94 views

Calculations in if statement

I want to perform a simple calculation with the Field Calculator using this piece of script (note that all the elif statements are attempts for another syntax and non of the worked): def ...
0
votes
4answers
48 views

Populate a field from another field with a conditional

I am working in SDE geodatabase where I have a feature class 'Mange_Waste' and "Q1", "Q2" are two fields. I wanted to use python script for populating "Q2" from "Q1" with a condition. Like, if the ...
2
votes
1answer
43 views

QGIS: Expression WHEN property1 = 'FOO' THEN property2 = 'BAR'

Our Foundation is adding additional properties to points. If property1 = FOO , then add property2 = BAR WHEN property1 = 'FOO' THEN property2 = 'BAR' END When I run this the ...
1
vote
2answers
58 views

Call field from zip() into Field Calculator expression ArcGIS

I've been trying to find a way to call in field names from a zip(). Basically I have 12 fields called "Flw_days1", "Flw_days2" etc and corresponding "Depth" fields that need to be calculated using the ...
0
votes
1answer
20 views

Interaction with two variables as parameters, saving the raster properties output into a table (.dbf)

The draft of the model below TASK: I need to calculate the percentage of river channel that is covered with shadow in each timestep RESOURCS: I have values for azimuth and elevation of the sun ...
0
votes
1answer
27 views

How to implement a Gaussian function in field calculator?

Are there any build-in functions like Gaussian or Epanechnikov functions in field calculator? Or I have to write that by myself?
1
vote
1answer
54 views

How to use Fields in the Field Calculator? [duplicate]

I'm using the Field Calculator in ArcMap and I need to create a unique ID for every storm drain in my county. An ID Should look something like this: 16-I-003 The first number is the municipal number ...
1
vote
2answers
80 views

Conditional Calculate Field Many to One

Anyone have experience calculating a field based on a many to one scenario? I have a feature class in a geodatabase with a field of unique names. Feature Class Table (let's call this ...
0
votes
2answers
50 views

Using the Rule-based style to calculate each grid cell from overlaps

I am using the Rule-based styling properties (QGIS 2.2) to determine the colour of grid cells for a merged shapefile. Each grid cell defined by its ID may be overlapped by several layers as defined by ...
0
votes
4answers
111 views

Calculating acreage using ArcGIS Field Calculator?

What is the expression to calculate an acreage in USA ? I am aware that there is a geometry calculate but when you convert raster to polygon it doesn't do it's job and I have to use the field ...
0
votes
2answers
55 views

ModelBuilder - How to calculate Field using part of path name

I am trying to calculate a field using part of the feature class path name (specifically, the last three characters of the geodatabase name). Is this possible? I've tried using the parse path tool and ...
0
votes
2answers
41 views

If clause within if clause VBA Arcgis10

I'm using ArcGIS10. I do not know what's wrong with this VBA code in the Field Calculator: *All the fields are String type If [StartY] < [EndY] Then If [DOT_OSM] ="1" Then Output = "F" ...
0
votes
1answer
26 views

How to fill Field2 to its corresponding values in Field1 of a shapefile using Filed calculator ARCGIS 10.2

I have to give explanation in a new field of the existing field which contains abbreviation. Example: Field "Geology" has values Q, Qs,N....(abbreviation), I have to give explanation of those in a ...
0
votes
3answers
61 views

ArcMap Change Values Greater than Standard Deviation of Mean to Zero

I have a feature class with greater than 1000 features and I would like to change all values greater than 2 Standard Deviations to a Zero. Seems like I could possibly use Field Calculator for ...
2
votes
1answer
67 views

Calculating the average / MEAN of an attribute field in a QGIS model

I need to know how to calculate the average / mean of an attribute field in my point shape file. Is this possible to do with the field calculator? I just found the options min or max but not mean. The ...
2
votes
1answer
92 views

How to get the First and Last Point coordinates of a Polyline with Field Calculator in ArcGIS10

I'm trying to get the First Point coordinates (x,y) and Final Point coordinates (x2,y2) from a polyline in ArcGIS 10 with the Field calculator. I've added 4 (double) fields like StartX,StartY,EndX ...
0
votes
1answer
110 views

Python Field Calculator ArcGIS 10.1 expression question

I have gotten stuck on another seemingly simple arcgis field calculator python expression. I obtained a great answer to a another similar question a few years ago: Python Field Calculator ArcGIS 10 ...
0
votes
1answer
63 views

Using Field Calculator to Add a Set Amount of Time to Date Field

I wish to georeference several photos to a track created using a Garmin Oregon 450t, but the time recorded in the photos and the time recorded in the .GPX are not the same. The format for the date ...
1
vote
2answers
74 views

How to compute percent of a field

I have a layer with a column conaining population values. I want to write an expression to compute in a new field the percentage of population each polygon has in relation to the total population. I ...
1
vote
1answer
43 views

Calculating average of 3 fields where nulls are present

I have created a new field to calculate the average of 3 other fields in a table where nulls are present. Using python as the parser(with no code block) I used this: (!Slope_PCT! or 0 + !Flood_PCT! ...
2
votes
2answers
130 views

Updating column in Field Calculator using values of another column?

I am very new to GIS, so I hope to get some help. I am using ArcGIS 10.2 for Desktop. I want to create a new numeric column on my attribute table to store "seasons" in numbers. For example, I want ...
3
votes
1answer
99 views

QGIS - Is it possible to increase Output Field Name?

When creating a new Column, the default value for the length of the name is 10. Using the Field Calculator via the Model Builder, I want to include the names of regional areas into the columns which ...
1
vote
2answers
146 views

Autoincrementing Python Script is over writing all fields versus just fields that are null

Using ArcMap and the Field Calculator I have a python script that should autoincrement the FacilityID field if it is null. It works the first time through but the second run causes it to overwrite ...
0
votes
1answer
71 views

Replacing attribute table entries using python script. Script needed

I am using ArcMap 10 from ArcGIS 10.2.1 package. I got an attribute table, with few collumns. I need to replace some column "String_A" entries with newer "String_B" entries, in the same row. In both ...
2
votes
1answer
330 views

Getting ValueError: max() arg is an empty sequence on a Python Script in the Field Calculator in ArcMap

I have a script that populates a FacilityID Field on a Attribute table in the Field Calculator but when I run the script below I am getting a error. EDIT: Python Script: def autoInc(): import ...
0
votes
1answer
60 views

How to calculate/record attachments' file names using Field Calculator?

I have a point feature class containing attachments corresponding to jpg files (sometime more than one jpg per feature). I would like to use the "field calculator" to calculate/record a new field that ...
2
votes
2answers
112 views

Comparing 2 fields using Python

I am trying to compare 2 fields(double) using python. I want to round to the nearest 10th and flag those with a "1" that are not equal. Here is what I have at the moment: def Qcontrol(old, new): ...
1
vote
1answer
36 views

Field Calculator extract three last digits from another field

How everyone! I have two fields the on is the cadastral number which is for example 051020213001 and I am trying to fill the other field (label) with the last 3 digits from the cadastral number, in ...
0
votes
3answers
77 views

Python QC field calculator

I am new to Python and am trying to run a simple QA/QC on a particular set of fields. I basically want to verify that fields x and y add up to z, I may have to incorporate rounding since a small ...
0
votes
1answer
63 views

How to use “this” Levenshtein Python code into ArcGIS 10

I need some help with this: First of all, I wanted to "Compare strings from two fields", and asking before at gis.stackexchange, in this post someone help me with this topic, referring me to a Python ...
2
votes
1answer
156 views

How to compare string fields in the same table with ArcGIS 10

I don't know exactly if there is a tool for this or a maybe a python script could be more suitable. I want to compare string elements from a field (POI_NAME) with another string element in another ...
0
votes
0answers
64 views

Using Code Block in Field Calculator with ArcObjects (VB.NET)

I'm having trouble using a code block in the Field Calculator with ArcObjects. Ideally, I'd like to be able to read a text file which contains the Python code for the code block. I've tested this code ...
2
votes
1answer
141 views

ESRI File Geodatabase with a field calculator with an incrementing number

I've got a python script that runs on the Field Calculator of a ESRI File Database. Right now it runs correctly in that it will increment the last three digits of the value. But this is a script ...
1
vote
2answers
65 views

How to include a quotation mark in a text field from field calculator

I'm trying to attribute pipe size and need to include a quotation mark in a text field. How do I include that in the field calculator. "4"" doesn't work.
0
votes
2answers
161 views

ERROR 000989: Python syntax error: Parsing error SyntaxError: invalid syntax (line 2)

I have a Field Calculator I am using with Python and I keep getting the above error. Below is the screenshot of my Field Calculator I am using. What am I doing wrong here?
0
votes
2answers
60 views

Use Python lists in Field Calculator?

I couldn't find this question, although I am sure it has been asked. How could I use a python list to condense this script? This code block currently works, but is clearly not very efficient. def ...
0
votes
1answer
84 views

Auto increment a new column using Model Builder Field Calculator in QGIS?

I am making a model which requires creating a grid and clipping various layers to it. Using the Create grid function does not provide an ID column, instead it creates 2 columns: "longitude" and ...
2
votes
1answer
97 views

How do I add a column in an attribute table using QGIS graphical modeler?

I have started to make a model in QGIS 2.2 graphical modeler. I have made a buffer around a polyline and used it to clip a polygon layer. So far i t works. But the next step is to add a new column ...
1
vote
1answer
87 views

Error when dividing a field with a number

Using arcpy CalculateField_management i want to divide a field with a spacific number: arcpy.CalculateField_management(EZG_shp, "IDX_AT_PK", "(!EURO_SUM!/!Anz_Pers!)/1668,4","PYTHON") This works in ...
1
vote
2answers
121 views

How to populate a text field with double quotes using field calculator

How would I populate a text field with double quotes using the Field Calculator. For example, I want to populate a field as 24". Is there a way to populate fields using the field calculator with ...
0
votes
1answer
29 views

same or similar search word with field calculator

I am using arcgis 10.1 I have two tables A and B need to find attributes of table B data are on the table A I'm doing a join between table A and B now I want to use the field calculator via a script ...
0
votes
1answer
75 views

Error when calculate field using VBscript or Python (slice a field)

I have an expression in VBscript that works well for labeling: Function FindLabel (field) if (INT(RIGHT(field, 2)) <> 1) then FindLabel = INT(MID(field, 8, 3)) &"-"& ...
4
votes
1answer
104 views

How to use %value% (from For iterator) in SQL expression of Calculate Field in ModelBuilder?

I have a shapefile with data of fish specimens and the coordinates where they were tagged for research purposes. One of the fields in the attribute table of these shapefiles is the fish length in ...
0
votes
1answer
68 views

QGIS: graphical-modeler to calculate area of polygons

I'm trying to calculate the area of polygons using the field-calculator in QGIS (2.0.1). If I do this manualy it works fine, but if I do this using the graphical-modeler I get NULL as area for every ...
2
votes
1answer
81 views

Replace characters

How to remove a special number of characters of a string, e.g. the last 7 characters? And how to join them as the first characters to the string of another field? Thank you for VBS and Python synthax ...