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

4
votes
1answer
102 views

Calculating a Unique ID on a Subgroup of Polygons

I would like to assign a unique ID to polygons in a dataset. The catch to my issue is that I would like polygons that fall within a polygon to have the same unique ID. My example is related to ...
4
votes
1answer
3k views

How to do a simple find and replace in QGIS field calculator?

I'm trying to replace selected string values in an attribute table, eg. "Text1" for "Text2" (QGIS 1.8.0), patriculary for those rows with NULL values. I have been trying to use the replace expression ...
0
votes
3answers
25 views

Debugging CalculateField_management ERROR 000623: Invalid value type for parameter field?

I am trying to select records in my table that have certain words in the "Name" field and then code them as 0 (not pharmacy) or 1 (pharmacy) This is just a test searching for two words to select ...
0
votes
2answers
48 views

Field calculator fails when computing First X coordinate in ArcGIS10

I have this line in python to compute First X coordinates into the Field Calculator from each polyline: !Shape!.firstPoint.X Then, when I inspected the attributes I see this rare thing: You may ...
4
votes
1answer
114 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 ...
2
votes
1answer
39 views

How to return end of string up to a certain character using Field Calculator?

I am trying to accomplish this task: http://stackoverflow.com/questions/15851568/how-to-get-the-last-part-of-a-string-before-a-certain-character within the Field Calculator. I have the below but ...
0
votes
1answer
36 views

Field Calculator not showing some fields

When I open my attribute table, click on a column, and select Field Calculator it opens and doesn't list all of the Fields in my attribute table. Why can't Field Calculator find these Fields?
-2
votes
0answers
30 views

Update fields in feature class [duplicate]

I am working on ArcGIS 10.2.1. I have a feature class containing more than 4000 records and a table having approximately 1000 records. Both feature class and table have some common fields however, ...
0
votes
1answer
50 views

Updating a feature class

I am working on ArcGIS 10.2.1. I have a feature class containing more than 4000 records and a table having approximately 1000 records. Both feature class and table have some common fields however, ...
1
vote
1answer
32 views

ArcMap 10.1 Crashing when using field calculator

I keep getting a serious error message when I try to use the field calculator. I've joined a .csv to my SDE feature class and am trying to set one of the columns equal to one of the columns from the ...
3
votes
1answer
172 views

Extract one GPS fix per day from data?

I am in the fortunate position of having 2 years worth of animal movement data. With such a large amount of data I would like to extract only one fix per day to make it easier to work with. Data = 14 ...
2
votes
1answer
408 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
0answers
25 views

Field is not nullable but Field is nullable Box is checked

I had this problem already a couple of times. I add a Field (float) to an existing feature class, the Field is Nullable is arleady checked. But performing a calculation with the Field Calculator on it ...
0
votes
1answer
79 views

ArcMap Calculate Field..if “text” in !Field!

Is it possible to use Field Calculator in ArcGIS to add text to a new field based on an if in statement? Example: In an attribute table I have a some fields called !X!, !Y!, !Z! where "A (xx%)", "B ...
0
votes
1answer
59 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 ...
5
votes
3answers
88 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 ...
2
votes
1answer
44 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 ...
6
votes
1answer
160 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 ...
2
votes
2answers
124 views

Expression to calculate and sort data from several layers into one layer

I am trying to develop an expression whereby one layer can add data from 2 other layers and then rank them, is this possible? I have also tried the problem with using just 1 layer but I cannot work ...
0
votes
1answer
21 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

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
99 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
52 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 ...
1
vote
1answer
491 views

Arc 10 Python .shp attributes - usings fields to populate other fields - if/then/else statement

Ive been looking for a solution and unable to find one so please help if able: I'm trying to avoid manually inputting Begin and End engineering station values already inputted into a seperate field. ...
0
votes
1answer
165 views

Join and Calculate vb.net

Im trying to join an excel table to a shapefile and then calculating those fields using vb.net. The code I have written has no errors, but won't work when I try it in ArcGIS 10.1 and I'm out of ideas. ...
2
votes
1answer
46 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 ...
4
votes
2answers
139 views

Changing default parser in ArcGIS Field Calculator to Python?

Is there a way to change the default parser in the Field Calculator to Python? So annoying to always change now that I'm trying to move away from using VBScript... I'm using ArcGIS 10.1 for ...
1
vote
1answer
117 views

How to create sequential field based on sorted data? (or extract pop-up data?)

I downloaded a kmz field and converted it to a GDB fc on arcmap. However, the field I need to label the layer by is stored in the pop-up html field... It looks like this: <html ...
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 ...
3
votes
1answer
315 views

How to Populate new field using expression containing MAX value from another field in ArcGIS attribute table using field calculator?

I've got one field X with 10 numerical attributes (float/double). I've created a new field Y (also float/double) which I need to populate with the percentage of each record/attribute (in each of the ...
1
vote
1answer
454 views

Using Calculate Field (Data Management) tool to calculate 3D Length in ArcGIS 10.1

I'm relatively new to the world of model builder and scripting, so it's likely there is a very simple solution to the question I've been trying to figure out. I'm trying to create a tool that takes ...
0
votes
1answer
206 views

Calculating Stream Length-gradient Index (Hack Index) with the field calculator

I'm trying to calculate the Stream Length-Gradient Index of a stream (example data below). Just started to get into python, but am struggling with a solution to this problem. I have 42 streams to run ...
3
votes
3answers
630 views

Calculating X and Y of line start and line end using ArcPy?

I have a series of polyline shapefiles and I am trying to automate the process of calculating the X and Y coordinates of the line start and line end using Python. I have added the 4 fields (startx, ...
1
vote
1answer
145 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 ...
2
votes
2answers
131 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 ...
0
votes
1answer
273 views

ArcGis Python Script, Calculate Field

Sorry for my English. I am trying to write a Python Script for ArcGis 10.2. #import system modules import arcpy import math from arcpy import env #Set environment options ...
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
61 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 ...
3
votes
3answers
2k views

Basic If/Then in ArcGIS 10.2 Field Calculator (Python or VB)

I've been looking through these threads and can't seem to figure out my answer yet. Very new to VBA and Python, but lots of years with Arc.I know I can do this the slow way with Select By Attributes, ...
1
vote
2answers
84 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
53 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 ...
2
votes
1answer
79 views

Extract characters inside parentheses in QGIS

I have a shapefile of the buildings on my college campus. It has a "name" field that includes the name of the building and then in parentheses the building's campus address (i.e. Health and ...
7
votes
3answers
2k views

Calculating Field based on name of shapefile

I have multiple shapefiles to which I have added a field called "gname1". For each shapefile, I want "gname1" to be set to the name of that particular shapefile, for every feature within the ...
0
votes
2answers
183 views

Field Calculator - replace string function

Within an attribute table I'm trying to replace one string with another using the 'replace' function . As an example, there are a number of features whose field 'NAME' contain the string '(B)' and ...
0
votes
4answers
114 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
0answers
67 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 ...
0
votes
2answers
57 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 ...
4
votes
3answers
643 views

How to insert a quotation mark through the Field Calculator of attribute table of a Shapefile?

I have a shapefile of polylines with information of diameter. But the problem is that i didn't enter the inch sign(") with the values of diameter. What would be the solution that qutation mark would ...
3
votes
1answer
460 views

Syntax of conditional statements in QGIS Field Calculator(s)

I have a shapefile which I need to modify. There is one column "CLASS" with the attributes: "A", "B" and "C". I need to change "A" into "1!, "B" into "2" and "C" into "3". I tried it with case when ...
6
votes
1answer
2k views

How to perform If Statement in Field Calculator of ArcGIS for Desktop?

I have a shapefile containing two numeric fields ("Dist_1" and "Dist_2"). I want a Field Calculation that will populate an additional field ("Result") with one of three answers: First if Dist_1 is ...