Field calculators (available in QGIS, ArcGIS Desktop, etc) can recalculate the values of a single field on all, or selected, records within a table using an expression.

learn more… | top users | synonyms (1)

1
vote
3answers
62 views

How do I normalize the values in a single Field (from a table) in ArcGIS?

First of all, this is my first post, and I would like to appreciate all the useful information I have found so far on this site. Second of all, I have encountered a problem, in Field Calculator. ...
1
vote
1answer
26 views

Concatenating fields while also replacing values within certain stings [on hold]

I am trying to use python to concatenate multiple fields in a polygon layer. Specifically, I am attempting to combine the values of four fields into one: EXPCODE = !MATRIX! & !PLANT! & !PCT! ...
2
votes
2answers
48 views

How to convert negative field values to positive?

I have an xyz file that I want to convert negative field values in the z column to positive values. How do I do this with field calculator?
2
votes
3answers
50 views

How do I use the field-calculator in QGIS to return the name of a country from a different shapefile?

I have a shapefile that consists of a list of archaeological sites with the x and y coordinates. I have an Natural Earth shapefile for the countries of world. I was wondering how I go about ...
0
votes
1answer
21 views

ArcGIS do calcuation on multiple input fields of attribute table and the number of input fields is changing

I have attribute table with headers: ID(bgrp), F1 (F2011_46), F2 (F2011_48), ...Fn I want to do math calculations on the fields from F1 to Fn. For example, count the total number of non-zero Fn ...
1
vote
0answers
18 views

Incorrect Acreage QGIS 2.6.0

I have six polygons, all of (fairly) similar size. The first one is 8 acres, the others are obviously wrong with 120,000 acres, and 106,000 acres and so on. I am calculating with the field calculator, ...
2
votes
1answer
24 views

Polygon shapefile field calculator problem

My project is set in WGS84 only, and I have checked 'enable on the fly'. I have created a polygon shapefile and my problem is that when i use field calculator in the attribute table on my polygon ...
0
votes
1answer
22 views

Raster Calculator or Local-Combine tool? (in ArcPy)

i have 3 classified rasters and i wanted to use the following query from r. calculator: (rclslope>=45) & (rclmosaic>=2000) & (rclfocal>15) to arc.py how can i write it? Is it ...
0
votes
4answers
89 views

Concatenate string data plus numeric data in Arcmap 10.2.2

I have three attribute fields (Address_No: 1, StreetName: Main, Street_Ty: ST) that I want to merge together. How do I concatenate string data found within the table plus numeric data? I would like ...
1
vote
0answers
27 views

Systematic inaccuracy in QGIS shape area

I’m trying to find out why I get different area figure in QGIS than in AutoCAD when I’m using the same shape file? What I did is I drew a shape in AutoCAD, imported it in QGIS and used the field ...
1
vote
1answer
29 views

How can I allocate a $rownum in reverse order in QGIS?

How can I allocate the $rownum value in reverse order in QGIS? I have a created a grid layer to use in an atlas and the ID allocated is from top left to bottom right - which is what I want if I want ...
1
vote
3answers
57 views

Calculate field management not working within customized Python tool in ArcGIS

I am trying to make a custom made Python Script tool which I would like to use in Model builder. I am using the arcpy.Calulate_field_management function (simple reclass function as an example), but it ...
3
votes
2answers
177 views

VB Script or Python for Field Calculator when using greater/less than?

What I have: I have 4 fields for my address ranges. L_ADD_FROM, R_ADD_FROM, L_ADD_TO & R_ADD_TO (all in DOUBLE field type). What I need: The lesser value from L_ADD_FROM and R_ADD_FROM to ...
0
votes
2answers
77 views

ArcGIS field calculator: Calculating a new field using multiple fields with python

Basically, I have a large polygon data set that has soil data for an area and I want to assign numeric values to the data based on soil texture text values (e.g. SIL=4, CLY=7, ...). However, the soil ...
3
votes
2answers
115 views

How to calculate a value based on another field under arcpy.da.UpdateCursor and cursor.updateRow?

I am trying to do a calculations under arcpy.da.UpdateCursor. I want to calculate the values for the records that have FIPS=06037. I want to take the values from "kg" column and populate the new value ...
1
vote
1answer
43 views

Calculate field based on other two added fields in ArcGIS Model Builder

I have a model in model builder where I add 2 fields, "field 1" and "field 2". For each field I calculate their values using the calculate field tools. Afterwards I add a third called "Field 3" of ...
0
votes
2answers
60 views

Use Python in Field Calculator to increment up value

Please see screenshot for field calculator Python logic. I have no idea what I'm doing that's any different from this GISSE answer. The error I receive is ERROR 000989: Python Syntax Error (invalid ...
1
vote
2answers
111 views

Cannot convert string to int using ArcPy Calculate Field

When I load a csv file to join with ArcPy, it converts all string fields that are numeric to integers. Therefore, I have to add another field within the feature class that I'm using for joining that ...
1
vote
1answer
44 views

new layer from calculations with fields of other layers in QGIS

I've two layers, both with the same fields: A, V, where A is the shape's area and V a value given by me. I want a new layer with shape created by the intersection of the other layers' shapes and a ...
2
votes
1answer
24 views

Create field on open ArcGIS map - not saved

I am using ArcGIS desktop with an SDE feature layer with enterprise data that I do not have rights to edit. The data changes weekly but I need a field that is sum of 2 current fields without creating ...
0
votes
1answer
54 views

if/then with VBScript in ArcGIS Field Calculator giving Error 000539: SyntaxError: invalid syntax?

What is wrong with this VBscript in the field calculator? ColumnC= if [ColumnB] > 0 then [ColumnC] = [ColumnA] / [ColumnB] endif Each time I receive this syntax error message: Error ...
1
vote
0answers
39 views

ArcGIS Calculate Fields gives Warning 000405 No records within table?

Situation: I have feature layer sitting outside processing extent in Environment settings. If I open layer's table and use field calculator - Calculate Geometry on some numeric field: it works ...
2
votes
1answer
119 views

ArcGIS Python syntax error using nested if else

I am trying to use the field calculator in ArcMap 10.2 to fill an empty field based on the contents of two exiting fields usint this python script in the Pre-Logic Script Code. def ...
0
votes
0answers
57 views

Line length for line files

Using QGIS, Brighton 2.6. Trying to calculate line-lengths for linear features (roads, trails, fenceline) and used this post (How to find line length in QGIS while editing?) and the links associated ...
1
vote
2answers
147 views

Using Python in the field calculator - if/else over multiple fields

I'm trying to work out how to populate a field depending on the lowest score across 6 other fields. I've read several other questions relating to if/else statements but I'm only just starting to learn ...
1
vote
2answers
76 views

Setting field equal to raster Name ID for batch process in ArcPy

I am wanting to set an existing field called RasterID to the name of the raster for which the attribute table belongs to, but for a batch of rasters. Is there a way to do this with my current code ...
-3
votes
2answers
67 views

Using ArcGIS field calculator?

This field calculate returns an error, whats wrong with it? def Reclass(A): elif ( A>= 0.208113 and A <= 0.261517): return "Low" elif (A > 0.261517 and A < 0.301951): return ...
0
votes
1answer
61 views

Populating a field in an attribute table with a consecutive number sequence? [duplicate]

I know that this is probably a very basic question but I cant seem to find an answer through Google searches. I would like to create a field in an attribute table (in ArcMap 10.2) for a Number Label ...
3
votes
2answers
104 views

How to pad field with blank spaces using calculate field tool of ArcMap?

I am trying to pad the right side of a field with blank spaces so that when I label the field, it labels further over to the left. The only way that I can seem to make this work so far is by adding a ...
0
votes
1answer
50 views

Calculate values in one field based on values in another field

I have one field with Zoning Codes (i.e.: RS) and I want to update another field with the string "Residential Single Family". The new field is currently NULL, I would like to add the full text string ...
3
votes
1answer
28 views

Joined tables and now field calulator is greyed out

In ArcMap (10.2), I accidentally calculated the wrong field outside of an edit session, so there was no way to reverse my action. I restored a previous version (shadow copy) and joined the tables ...
7
votes
2answers
218 views

How to find if polygon has a hole using field calculator in ArcGIS

Some 3rd party software cannot handle polygons with holes (donut polygons). To find them I always use ArcView 3 field calculator, because: however when I try to do this in ArcGIS, I get this: So ...
0
votes
1answer
28 views

Sum a field, and take that sum and use it to populate an existing field in the same table

I am trying to break down land uses in a watershed by making a tool in ModelBuilder. Right now I am clipping a land use layer by a watershed polygon, dissolving land use layer by land use code, ...
1
vote
3answers
209 views

Extract numbers from string field

I am trying to calculate field test2 with only the numeric values from a string field test. The entire script is like: def makestr(test) list=[] for s in test: if s.isdigit(): ...
1
vote
1answer
28 views

How to fill column with several conditions using QGIS field calculator?

I know the synthax in order to fill one field with only one condition (field calculator): case When "attribut" = 'value' then value End But how to do populate automatically one field with ...
1
vote
1answer
33 views

Multiply whole column with the field calculator in QGIS

I have a layer with the field size. I did some mistake with the value and now I need the values multiplied by 16. But instead of going through 500 lines and recalculating them I would like QGIS to do ...
3
votes
3answers
137 views

Calculating file name with field calculator

Is it possible to calculate the file name in an attribute table? My shape file has a name like "cities.shp". In this shape file I want to have a attribute "cities").
1
vote
1answer
23 views

How to update the value of a field dependant upon the the fields ID in QGIS Field Calculator

I am looking to create links to website pages and to automate the procedure a bit more I would like to have a standard link followed by the ID of each field. For example, I would like the standard ...
2
votes
3answers
77 views

Prefixing multiple values within QGIS using the Field Calculator?

I have a column in my my attribute table that contains a series of individually numbered locations. I wish to prefix all of these numbers with a letter, this letter will be the same for each of the ...
0
votes
1answer
36 views

Changing field values using arcpy

Say I want to make my field buff_dist longer than by 400ft, I want to write a code that will go through the table and change the field value by adding 400ft to it's value. How would I write that? I ...
3
votes
1answer
72 views

Accumulating values of date field using Python parser of ArcGIS Field Calculator?

I would like to modify the following accumulative/sequential python code sample in field calculator in a Date Time field. I think this is the correct code to use but let me know if not. The Date Time ...
2
votes
1answer
129 views

Converting values in datetime field to strings in text field using Python parser of ArcGIS for Desktop?

In the attribute table of my file geodatabase feature class I have a populated field called DateField of type date, and a text field called TextField. I have not yet hit on a way to convert the ...
0
votes
1answer
28 views

Adding formula in field calculator when new attribute is text type?

I added a new text attribute to my table. I would like it to print the values "y" or 'n", for when an attribute in the table is other a specific cut off it will code Y, and then that attribute is ...
2
votes
1answer
74 views

Calculating Percentiles in ArcMap?

I have a large polygon dataset (26,000) records with numerous attributes columns. I wish to calculate the percentile rank of each attribute. Say I have population_density in an attribute, is there a ...
0
votes
1answer
106 views

Concatenate Multiple String Fields and Convert to Date field using ArcGIS Field Calculator?

I'm Working in Model builder using the calculate value tool. I have three columns - SignatureDay, SignatureMonth, SignatureYear - All three are string data types and all consist of just numbers for ...
1
vote
2answers
22 views

QGIS upper round in field calculator

I need to to in the field calculator the following calc: toint(Field1 / 25.0) but i need to round the result to no decimal places but upwards. Exmaples: If 17/25 result should 1. If 25/25 result ...
1
vote
0answers
41 views

Assigning score to raster based on cell overlap with other raster and field value

I have a set of rasters that I've assigned scores to individually (scored based predominantly on values of other fields). The scoring scale is the same for all rasters, but the factors that determine ...
1
vote
3answers
49 views

VB Script field calculator - error with conditional statements

I have limited VB Script experience, but have been working on the script below and keep getting errors, the most common being "expected identifier". Can someone tell me what I'm missing here? Dim ...
2
votes
4answers
69 views

Auto populate field with text using field calculator if/then

I've extracted values from a raster to a point file, but now I need a field with the text information from the raster attribute table that corresponds with the value. I've been trying to use the field ...
0
votes
1answer
50 views

How can I refer to two tables in ArcPy's CalculateField_management? [closed]

I tried to refer to the different table's fields just like I saw in How to Calculate Field in joined table using ArcPy? but it doesn't work. There are two tables in my example. I have created table ...