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)

0
votes
1answer
40 views

Problem with lists in Python expression in Field Calculator

I want a bit analytical respond for the mistakes I have done in my code cause I am new to programming. I am using ArcGis 10.2. and I must process a field with distances in an attribute table I have. ...
1
vote
1answer
17 views

How to change GK-coordinates to UTM with the field calculator in QGIS?

i have a qgis project in ETRS89 (UTM) with some vectorshapes. i already transformes them from GK into UTM. but now the attribute table still show me the GK-coordinates. HOW can i change it? with the ...
0
votes
0answers
44 views

Simple problem with python and sql expression in Field Calculator [on hold]

I am using ArcGis 10.2. I have a problem with my syntax in field calculator although I have tried a lot. Probably it will be a funny task for many of you but I have spent 2 days until now. I have a ...
4
votes
1answer
164 views

Converting 12-hour time to 24-hour time using Field Calculator

Does anyone know how to convert string time formats in ArcMap v10.2 from 12-hour to 24-hour using a simple query in the Field Calculator? i.e. NO Python, NO editing in Excel, NO changing my Windows PC ...
2
votes
3answers
88 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
39 views

Attribute table not updating after QGIS field calculator used? [on hold]

Using QGIS 2.8.1 i am trying to update an attribute table using the field calculator. its a vector layer of vegetation communities. i am trying to update the area fields in the table. The output ...
0
votes
2answers
1k 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 ...
1
vote
2answers
456 views

area values determined with field calculator become null when saving

using field calculator in Qgis 1.8.0 to get the area, it shows just right at first but when I save it, the values become Null. help please
1
vote
1answer
28 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! ...
1
vote
1answer
331 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. ...
1
vote
1answer
188 views

Slow performance with Add Join and Calculate Field?

I have a point layer and a table with approximately 100 fields. I need to join the table to the point layer based on a key field and create a new shapefile / feature class. This script has been ...
1
vote
1answer
392 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 ...
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
52 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
22 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 ...
6
votes
5answers
9k views

How do you test for a NULL string field in the Field Calculator with Python?

I am trying to perform an operation on a string field with a condition that it contains data. Referencing None with Python does not appear to work when the field is nullable and contains <Null> ...
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
25 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 ...
1
vote
3answers
848 views

Why do area calculations return negative values?

I have created a shapefile with some polygons and am now trying to calculate the area of these polygons. The original CRS was WGS84, I have reprojected it to WGS 84 / World Mercator so unit is metres. ...
0
votes
1answer
24 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 ...
3
votes
2answers
120 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 ...
3
votes
2answers
179 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 ...
1
vote
0answers
28 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
58 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 ...
0
votes
2answers
80 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 ...
1
vote
2answers
115 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
45 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 ...
2
votes
1answer
1k 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 ...
1
vote
1answer
202 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 ...
5
votes
1answer
165 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 ...
3
votes
1answer
139 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 ...
0
votes
2answers
61 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 ...
4
votes
3answers
103 views

basic problem using division in field calculator

This is a very basic question, but I can't figure out what's going on. I've got election results I'd like to simply display as percentages rather than vote totals, which should be as simple as ...
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
56 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
40 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 ...
5
votes
3answers
2k views

calculating a field in which null values may be present

I would like to calculate a field (short integer) using other fields (short integer) present in the table. In some cases these fields may have null values for one or more of the fields. For example, ...
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 ...
2
votes
1answer
122 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 ...
4
votes
1answer
265 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 ...
1
vote
2answers
150 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 ...
2
votes
2answers
2k views

Recoding values based on contents using ArcGIS Field Calculator or Python?

Is there a convenient (or even effective) method for recoding field values using the field calculator or standalone python script? In this case, I am given several unique strings to identify a type ...
1
vote
2answers
79 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
72 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 ...
3
votes
2answers
105 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
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 ...
0
votes
1answer
51 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 ...