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

1
vote
0answers
13 views

Trouble calculating areas in QGIS using field calculator

I am testing various projections to calculate areas using ICES statistical shapefiles and the QGIS field calculator. I am using ICES areas downloadable from the following link: ...
5
votes
1answer
96 views

How do I extract partial data from one field to another?

Answer Below I am attempting to extract a date stamp that is contained in one field and insert it into another field. The issue is that the date (in bold below) is not in the same location in each ...
2
votes
4answers
88 views

Field Calculator Python Expression Issues

I'm pretty new to Python and this is my first post on this forum so I could use some help. I am currently attempting to run some code in the Field Calculator in a model in order to replace string ...
1
vote
1answer
80 views

Simple field calculator equation in ArcGIS 10.2.1 not working with python parser

I am trying to calculate a percentage in a field in a table. customers and total_customers are short integer fields. arcpy.AddField_management(tableSepSel2, "percent", "DOUBLE") ...
0
votes
0answers
53 views

Why will my field calculator python function always return Null if any inputs are Null?

I've written a simple python function that outputs a list based on yes/no fields. It appends a word to a list if it has a "yes" in another column then writes the list, formatted according to the ...
1
vote
0answers
57 views

Cumulative field calculation using Python in ArcGIS for Desktop?

I am using the following Python code to sum cumulatively but I need the summation to take place while the other field is equal to 1 and then again start the summation when it's equal to 2. I need the ...
2
votes
2answers
109 views

How to calculate area of shapefile with a merged layer

so i have 'save as''d the new project and layer with my new Custom CRS project string being '+proj=laea +lat_0=70 +lon_0=0 +x_0=0 +y_0=0 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs'. ...
3
votes
2answers
101 views

How I can reverse numbers in a string without reversing any text? [closed]

I have a string, I need to reverse just the numbers in the string without the text: String: [321 test] The result will be: [123 test]
1
vote
1answer
61 views

How to calculate unique IDs starting from highest current ID

I have been using a python script in field calculator in ArcGIS 10.2 to add unique IDs automatically, however there are two things I would like to improve this process: Each ID also has letters at ...
1
vote
2answers
48 views

How to concatenate double with string in field calculator with Python expression?

I'd like to concatenate my lat/lng with a few string fields in ArcGIS. What is the correct expression to use, avoiding VBA. I don't want to convert the lat/lng fields to string either. my 4 fields ...
1
vote
3answers
53 views

If/then Field Calculator

I have two fields in my model, the first is a spatial join return for the township, the second is a spatical join to a city. If there is not city, then the field is left blank. The column that has ...
0
votes
0answers
25 views

Concatenate an object ID and string to publish gp service with field calculator?

I have a simple model which concatenates and object id and a string, to create something like 1SRS2567, the concatenate function of OID and the string field are able to be passed in VB, but not ...
3
votes
1answer
73 views

How to calculate the intersected area from a layer with overlapping buffers in qgis

I need to calculate the area of landusetypes in 50m around various dots (all in one shapfile). My problem is, the buffers around the dots are overlapping each over in some places. I tried to ...
1
vote
2answers
58 views

Concatenating text and string in Field Calculator expression (python)

I'm trying to copy an attribute value from one field to another (sum of raster values), but I'm having issues in writing a functioning expression for a Calculate Field script. I'm adding a field ...
3
votes
1answer
114 views

Why is this field calculator expression evaluated incorrectly when using Python syntax?

I have a polygon featureclass containing an integer field 'gridcode'. I've added 2 new float fields VB_calc and Python_calc, both of which should be equal to gridcode / 1,000,000. If I calculate the ...
2
votes
1answer
46 views

Concatenate multiple string / text fields some of which may have NULL values ArcGIS

I am trying to repeat the behavior of this code from the ESRI website. I want to replicate the output example in ALL_Type field, so that it concatenates a field but it deals (ignores) any that have ...
1
vote
1answer
55 views

Calculating Field B from Field A, except where Field B has existing value, using ArcGIS Desktop 9.3?

Im trying to calculate Field B from Field A except where Field B has existing value in ArcGIS Desktop 9.3. (I suspect its straight forward but I have 'searched' and havent cracked it yet) Any ...
1
vote
1answer
61 views

Calculation of a text value, The value of which is separated by a special character

How can I calculate a text value, the value of which is separated by a special character? For example: dog | duck, I would like to keep the first value: dog or elephant | cat, I want to keep ...
3
votes
1answer
311 views

Adding an “m” to the end of every number in a row

What function do i need to use to add an space and an m after every item in a row, using the field calculator in the attributes table. I have a load of numbers (as strings) and would like to add m ...
2
votes
1answer
52 views

How to convert unix time to qt time type?

How can I convert unix timestamp to qt time type using qgis field calculator? I would like to avoid importing my table into excel and convert the timestamp to qt time type.
2
votes
1answer
148 views

Python Syntax Error when running Python Snippet of successful geoprocess

I am having an issue with a simple python snippet. Here's the background: I wanted to include an additional step in a nightly update script that replaces characters in a field that simply do not play ...
4
votes
1answer
73 views

Calculate Field in ModelBuilder gives General error executing calculator. ERROR 999999: Error executing function. Expected end of statement?

I am attempting to do zonal statistics for multiple images and I need to add an extra field that will have the name of each raster file in each row to the finally appended file. I have added a field ...
0
votes
1answer
59 views

Field Calculator If/Then in ArcGis 10.1

I've been looking through these threads, i found something similar and thought it could be the answer, but it doen't seem to work for me... I could do this the slow way with Select By Attributes, but ...
1
vote
0answers
62 views

Cause of Field Calculator UnicodeEncodeError: 'ascii' codec can't encode character u'\xf6' in position 5: ordinal not in range(128)? [closed]

def Befahrung(value1,value2): if value1 is ' ': return ' ' else: return "G:\\Example\\" + str(value1) + "\\File_" + str(value2) + ".pdf" I try to create a field with a hyperlink. It works ...
2
votes
3answers
209 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
55 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 ...
3
votes
0answers
63 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 ...
3
votes
0answers
51 views

Can you use wildcards for column headers in Field Calculator?

I know you can use wildcards for fields like so (in the Field Calculator): case when "column" ILIKE '%example%' then 1 else 0 end Can you do something similar for the column headers themselves? I ...
2
votes
1answer
45 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 ...
2
votes
0answers
31 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.
2
votes
1answer
57 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
96 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, ...
4
votes
1answer
112 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
46 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 ...
2
votes
1answer
55 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 ...
1
vote
1answer
50 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 ...
1
vote
1answer
31 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 ...
3
votes
2answers
58 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 ...
0
votes
0answers
24 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
165 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?
0
votes
3answers
52 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
52 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 ...
2
votes
1answer
51 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
42 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?
1
vote
1answer
47 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 ...
1
vote
1answer
70 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, ...
4
votes
1answer
180 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 ...
0
votes
0answers
31 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
63 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
57 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 ...