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
1answer
272 views

Python Field Calc for Document Hyperlink

I am trying to create a script that will hyperlink to a .tiff or .pdf. These files are stored in one folder on a shared server. I want the script to look in a field: 'PLAT_IMAGE', which has the plat ...
1
vote
1answer
324 views

remove whitespace Python code results in odd character - Field Calculator

I need to remove whitespace from the end of a string in a field in ArcMap. I tried first the VBA function RTrim, but whitespace still remained. I thought maybe the whitespaces were tabs, so I tried ...
1
vote
1answer
174 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 ...
1
vote
1answer
102 views

How to reach a field value of a record in field calculator in ArcGIS 10.1

I have two fields showing number of people in two age groups "young" and "old". these people also live in a cell (point) whose distance to a specific facility is calculated. then I categorized these ...
1
vote
1answer
488 views

How to calculate field as cursor name?

First time dealing with cursor. I have lines intersecting polygons, I want to get a table with all attributes of the lines, add a field and calculate the field as the name of the polygon. I was able ...
1
vote
1answer
93 views

How to import text only out of a string field to a new field

I want to import data out of a string field in my shapefile to a new field for labeling. The string field contains river names and codes and I just want to display the text i.e river names
1
vote
1answer
2k views

Do QGIS Field Calculator xat(n) and yat(n) functions work in version 1.7.x?

I'm trying to use the xat(n) and yat(n) in the Field Calculator but can't get them to work. Does anybody have an example how to use them? I need the start and end coordinates for line segments, does ...
1
vote
0answers
15 views

Trying to export stacked text to CAD using ArcGIS 10.2

I've been experiencing some unwanted results when trying to export stacked text to CAD using ArcGIS 10.2 for desktop. With the Export to CAD tool I can easily export polygons. However, I'm also trying ...
1
vote
1answer
43 views

Use value of Field in Calculation in Modelbilder

In Modelbuilder I have set up a model, where in one step I do a "Calculate Field" like "round((!OID!-1- %MyField% /15)/452,1)+1" . For the calculation i use the value of %MyField%, which actually is ...
1
vote
0answers
39 views

QGIS field calculator expression: selecting min/max values within field groups

I am new to using QGIS (previously used Arc) and trying to get my head round the expressions and Python. I have series of polylines representing routes and require the linear distance from the ...
1
vote
1answer
35 views

Categorizing GPS data based on cumulative time using ArcGIS Desktop?

I have GPS data which includes “Lon”, “Lat”, and cumulative Time from 0 (sec) as fields. I want to add an integer variable new field, “Trip,” which starts from zero, and is incremented by one after ...
1
vote
0answers
30 views

Field Calculator QGIS: CASE WHEN [duplicate]

at first, sorry for my English. I'm using Google translator. I have a .shp file with attribute table. Like this... -- A -- -- B -- -- C -- QString Double Double Data ...
1
vote
1answer
67 views

Concatenate fields value excluding empty values

I need to concatenate the value of two fields excluding empty values, using Field calculator. The fields are: AREA_HI and AREA_LO I have tried using a Python script but ArcGIS returns an error ...
1
vote
0answers
50 views

Geometric functions in field calculator in QGIS

I had a look in the manual of QGIS and I also browsed the Internet to find some useful information about the geometric functions of the field calculator. I've found this post but I'm still confused. ...
1
vote
0answers
101 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 ...
1
vote
0answers
130 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 ...
1
vote
1answer
64 views

Calculating average of 3 fields where nulls are present

I have created a new field to calculate the average of 3 other fields in a table where nulls are present. Using python as the parser(with no code block) I used this: (!Slope_PCT! or 0 + !Flood_PCT! ...
1
vote
0answers
21 views

Can a joined-layer have its attribute changed depending on what layers are selected/deselected?

Using QGIS, I have a polygon-grid layer which covers everything, Layer_All joined with 2 other grid layers: Layer_1 and Layer_2, both of which intersect at various points. I would like Layer_All to ...
1
vote
1answer
329 views

Null value error with Python in field calculator

I'm trying to calculate the angle between two line segments in ArcMap 10.0. I have a point shapefile, so I'm using the xy coordinates of 3 successive points to calculate the angle. I'm trying to use ...
1
vote
1answer
173 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
0answers
34 views

How to replace accented strings in attribute tables using Python or VBA ArcGIS 10.2 [duplicate]

I need to replace accented words, into the Field Calculator, to the same non-accented ones. For example: María ---> Maria Need some help with this VB Code: Dim data as integer Dim contador Dim ...
1
vote
1answer
317 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 ...
1
vote
1answer
68 views

Mismatch in area calculation using Field Calculator vs Group Stats in QGIS 2.0

I have two polygon files (A being my area of interest and B being a categorised land cover layer). Both layers were in the same projection (projected and not geographic). Using QGIS 2.0, I used the ...
1
vote
0answers
89 views

VB Script can't run in Field Calculator

I wrote a simple script in VB. But it failed to run in field calculator. I can't figure out what is wrong with it. Below is a screenshot. Thanks for your help.
1
vote
0answers
893 views

Using multiple fields for a Reclass calculation in ArcGIS Field Calculator [closed]

I am trying to create a dummy variable from an existing dataset using ArcGIS's Field Calculator tool with a Python script. My conditions require the use of multiple fields to determine the output ...
1
vote
0answers
63 views

How to measure area of polygons generated from gps data in qgis? [duplicate]

Somebody classified my question as a duplicate. But applying the answer doesn't work for me. Here is what I did: - I made sure that my layer is in a projected coordinate system (UTM30N, WGS84) - I ...
1
vote
1answer
1k views

ArcGis File Geodatabase with Null values (Field Calculator)

I want to use the field calculator to get the sum of a couple of columns. The problem is that some of them has Null Values. I am not able to find a solution. I tried this Python functions: stack( ...
1
vote
1answer
962 views

How to use field calculator for area calculations in QGis? [duplicate]

Possible Duplicate: Calculate area between contour lines on a DEM with Qgis 1.8.0-Lisboa Based on a DEM of a whole country I have reclassified altitudinal bands with steps of 100 metres ...
1
vote
0answers
239 views

How to calculate column average in Arcmap using VBA [closed]

I'm really new in gis and programming... So could anyone write VBA code for counting average. For example I have 3 columns which are named as JAN, FEB, MART...Each of them have 50 values in column. ...
1
vote
2answers
99 views

How to compute percent of a field

I have a layer with a column conaining population values. I want to write an expression to compute in a new field the percentage of population each polygon has in relation to the total population. I ...
1
vote
2answers
239 views

Using python elif syntax in Field Calculator to reclassify a range of values from a different field and populate a new field

I'm trying to use the Field Calculator with a python elif statement to reclassify values from a different field and populate a new field, and while I'm not getting an error message of any kind, I'm ...
1
vote
2answers
339 views

How to use centroid option in Field Calculator in QGis

I want to use Centroid option in field calculator in QGis .How to access it?
0
votes
2answers
640 views

ERROR 000989: Python syntax error: Parsing error SyntaxError: invalid syntax (line 2)

I have a Field Calculator I am using with Python and I keep getting the above error. Below is the screenshot of my Field Calculator I am using. What am I doing wrong here?
0
votes
4answers
58 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 ...
0
votes
2answers
98 views

Use Python lists in Field Calculator?

I couldn't find this question, although I am sure it has been asked. How could I use a python list to condense this script? This code block currently works, but is clearly not very efficient. def ...
0
votes
3answers
84 views

Python QC field calculator

I am new to Python and am trying to run a simple QA/QC on a particular set of fields. I basically want to verify that fields x and y add up to z, I may have to incorporate rounding since a small ...
0
votes
1answer
144 views

Error when calculate field using VBscript or Python (slice a field)

I have an expression in VBscript that works well for labeling: Function FindLabel (field) if (INT(RIGHT(field, 2)) <> 1) then FindLabel = INT(MID(field, 8, 3)) &"-"& ...
0
votes
1answer
96 views

Python field calc syntax error

The screenshot shows a calculate field tool in modelbuilder. The error I'm getting is invalid syntax line 1. I can't see any issues w/the syntax so I'm hoping someone out there can help. It ...
0
votes
5answers
3k views

Changing null value to specific numbers in ArcGIS for Desktop? [closed]

I have a Excel file showing annual precipitation and I add it on arcmap. When I tried to check it's attribute table the field calculator is passive. I want to change all the Null value to specific ...
0
votes
1answer
36 views

What is expression for finding perimeter in ArcPy and Field Calculator?

What is the correct format for finding perimeter as an expression for arcpy. I was able to use expression !shape.Area! to find the area of my polygon. However when I use the expression ...
0
votes
4answers
438 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
2answers
51 views

If clause within if clause VBA Arcgis10

I'm using ArcGIS10. I do not know what's wrong with this VBA code in the Field Calculator: *All the fields are String type If [StartY] < [EndY] Then If [DOT_OSM] ="1" Then Output = "F" ...
0
votes
1answer
114 views

Parsing field in field calculator using Python

I have field1 which has a values of "A_B" (example). I created two fields out of this, values to the left of the underscore go in fielda and to the right of the underscore go in fieldb. I used the ...
0
votes
2answers
460 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
1answer
60 views

Using Field Calculator to fill out a list of unit numbers

I am adding address points for individual units in trailer/RV parks and I would like to be able to use the Field Calculator to assign the unit numbers. Is it possible to tell the Field Calculator a ...
0
votes
2answers
146 views

How to replace “NULL” value with Zero in geodatabase table

I am having some difficulties to change "NULL" values to zero in geodatabase. I have tried the following python code in ArcGIS 10.1 ("Field Calculator") to change it but did not work. Pre-Logic ...
0
votes
1answer
82 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 ...
0
votes
3answers
107 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
56 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 ...
0
votes
1answer
32 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?