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

3
votes
0answers
50 views

How to calculate percentages using QGIS field calculator expression?

I am new to QGIS. I am wanting to calculate a field using other fields and some operators. Here is my expression: case When "RVM_CAT" = 'B' OR "RVM_CAT" = 'C' Then ("PC1" /100) * "RE_ha" When ...
2
votes
3answers
131 views

Setting Zero values back to NULL

I'm working with ArcGIS 10.2 for Desktop and OS Windows 7. I need to set numeric vales from Zero back to NULL, but I can't from the field calculator. I'm working with a vector file and I need to ...
0
votes
0answers
50 views

calculating decimal degrees from coordinates found in an excel table

What is the exact syntax to use when calculating decimal degrees in the field calculator? I know the general formula {i.e. Degree + (minute/60) + (second/3600)} but how do I put this into the gis? I ...
2
votes
2answers
90 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
0answers
30 views

How to get Subtype name in Field using field calculator [duplicate]

I would like to get feature subtype name in another field using field calculator. Any one can advise to make this success? I am expecting ".Cal" file code using with Field calculator.
0
votes
1answer
186 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. ...
3
votes
0answers
29 views

Can you use wildcards for column headers in Field Calculator?

I know you can use wildcards for fields as shown in the example below (done in the Field Calculator): case when "column" ILIKE '%example%' then 1 else 0 end Can you do something similar for the ...
2
votes
1answer
39 views

Populate field with current time

I am trying to populate a field with the current time. Here is what I tried that did not work: Start editing Open Attribute Table Add Field -> Name: time Type: Date Right Click on Field Name ...
0
votes
1answer
330 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 ...
5
votes
2answers
2k views

Arc 10 field calculator scripts

I need scripts for the field calculator that: extracts the first word from a column, i.e. "Jones School" - "Jones", and A script that will capitalize this new field, "Jones" - "JONES". This is Arc ...
2
votes
1answer
51 views

Problem with Python codeblock recognizing a field

'<'First Post Alert> I've been through multiple iterations / gyrations, and while there may be multiple problems here (and I'll appreciate feedback on all of them), the recurring issue is that the ...
3
votes
2answers
374 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 ...
3
votes
2answers
85 views

Calculate Field Syntax: If statement over many fields

Apologies if this has already being asked but I couldn't find a page pointing to this problem. I'm struggling with the python syntax in the Calculate Field so that, in the table above: if b, c, d, ...
1
vote
1answer
230 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 ...
8
votes
8answers
6k views

How to Remove return/newline (\n) character from Field using Python and Field Calculator?

I have a geodatabase table with a field that I'm trying to remove return characters (new line). I found this post (How can I remove (chomp) a newline in Python?) of how to do it, however it is not ...
4
votes
1answer
102 views

How to SUM field and then insert into NULL column?

I am only in the beginning stages of learning Python. I have a column, 'QUANTITY_SOLID', that I want to take the sum of all of its rows. I understand I can do this with 'SUMMARY_STATISTICS', but i'm ...
3
votes
0answers
41 views

Warning 000405 when trying to calculate field [closed]

I am trying to create a model but am getting hung up on my first step. I need to calculate an ID field from an FID field so that I can join it to another table based on the ID field. So I have a ...
4
votes
1answer
1k views

How to convert state name abbreviations to full names?

I have a data table with columns that includes city names (ex: San Jose) and state name abbreviations (ex: CA). Is there a way to define the state names as their full names (i.e., CA = California) and ...
1
vote
1answer
44 views

Sum a field in buffer intersection

I have looked and do not see this answered in any other discussions. Purpose: Site suitability analysis for brewers spent grain processing facility Method: Locate intersecting buffers with greatest ...
2
votes
1answer
48 views

How to find and replace a singe word in a string?

How do i find and replace a single word of a string? e.g. Calle Iparraguirre to Iparraguirre I've tried: replace( 'Calle\\s', 'Calle\\s', '') replace( "name",'calle','') and all combinations ...
3
votes
2answers
55 views

assign a number for each group in field calculator

I have several thousand features each of which has a name. The names are not unique. what I want to do with the field calculator is assign a number to each name so I can refer to a number and always ...
1
vote
1answer
22 views

Use Field Calculator to change “Status” field in Annotations

I am trying to turn off a lot of annotations at once by using Field Calculator to set status to Unplaced. Just typing "Unplaced" into the expression, I get this error: The calculated value is ...
1
vote
1answer
122 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
1answer
494 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
143 views

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

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
30 views

Filling Field2 to icorresponding values in Field1 of shapefile using Field Calculator of ArcGIS for Desktop?

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 ...
1
vote
1answer
66 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, ...
0
votes
0answers
23 views

Assigning values to new field using field calculator? [duplicate]

I have a polygon with attributes showing the service area of 300m from a busstop as well as 600m from a busstop. Attribute fields > From Break with values 0 and some with values 300 Attribute fields > ...
1
vote
1answer
139 views

Adding count of features in categories to legend using ArcGIS for Desktop?

I am using ArcGIS 10.1 for Desktop and I would like to know How to add the Count (which is visible on the Symbology tab of the Layer Properties dialog) to the legend?
4
votes
1answer
110 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
28 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
50 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
128 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
45 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
37 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
32 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, ...
1
vote
1answer
35 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 ...
4
votes
1answer
179 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
566 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
28 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
82 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
60 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
97 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
48 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
174 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
129 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
24 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
29 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
109 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 ...