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

0
votes
0answers
26 views

I need to add one table to another table as strings.

But all of this two table data is numeric. And one of them is float. So I need to add from the float table only integer and merge it with other table. What to write in field calculator?
0
votes
0answers
218 views

How can I get shape filename in attribute field using field calculator with VBA?

I want to store ths shapefile name in an attribute field using the field calculator and visual, but can't find the way to do it. Can anyone help me, please? Thanks!!!
2
votes
1answer
662 views

Using the Field Calculator in a Domain field

I have a coded domain field with 10 dropdown options. Possible choices include integers and text. I need to change a selection of 250 features (which have differing values) to the same value. This ...
1
vote
1answer
525 views

Delete first two letters from a string field

I'm looking for a field calculator python statement to delete only the first two letters of string entries. For Ex: !Name!.strip([0:2]) I know this syntax is incorrect. Thanks a lot
0
votes
0answers
50 views

How to populate polygon extents to an attribute table in QGIS

Is there a way to calculate the XMIN, YMIN, XMAX and YMAX of a polygon and write it to a field in an attribute table? The Geometry functions available in the Field Calculator are for points. ...
2
votes
1answer
169 views

Mysterious Invalid Syntax in Field Calculation

I'm trying to calculate a field in Model Builder using the Calculate Field tool. I'm using the following code block and expression in the calculation, but am getting an "invalid syntax (, line 1)" ...
4
votes
2answers
380 views

Field Calculator decimal places - how can I limit them?

I've added a new column to an attribute table and performed an operation with the field calculator to populate the new column. The result is a column with a percentage. My problem isn't major but I ...
0
votes
3answers
235 views

How can I easily detect gaps in a polyline using arcmap 10.0 (arcview license)?

I'm making routes by selecting links from a streets layer which I export as a new temporarely layer in arcmap 10. This layer which I call route_temp unfortunately can be very long and contain gaps, ...
2
votes
2answers
354 views

Type mismatch error in Calculate Field tool in ArcGIS 10.1

I'm trying to run a rather lengthy model (built in ArcGIS 9.3.1) in ArcGIS 10.1 and I'm recieving an error on a Calculate Field tool. The error is - Type mismatch: 'iif'. This error is refering to ...
5
votes
1answer
204 views

How to add attributes in proportion to intersecting area from another layer

I am new to using QGIS. I have two polygon layers: Voronoi of Access Points Census block maps with population I want to get number of people covered by each Access Point (Assuming uniform ...
2
votes
1answer
101 views

Syntax question for ArcGIS ICalculator object

This is a silly question, but I have this code snippet that I can't figure out: 'Define a calculator for NewArea field pCalculator = New Calculator With pCalculator .Cursor = pCursor ...
1
vote
1answer
435 views

Arc 10 Python .shp attributes - usings fields to populate other fields - if/then/else statement

Ive been looking for a solution and unable to find one so please help if able: I'm trying to avoid manually inputting Begin and End engineering station values already inputted into a seperate field. ...
4
votes
2answers
158 views

ArcMap: Calculate Quarter using Date field

I am using ArcMap 10.0 and making a map where I symbolize on annual quarter (i.e. Q1 2013, Q2 2013, and so on by quarter through 2015). If a date field contains this: 01/15/2013, and I wanted to ...
-1
votes
1answer
213 views

Field Calculator Does not Work in Arc10

I'm having a problem, described below, with Field Calculator in ArcGIS 10. I wonder if there is a known fix at this point. I'm updating to 10.1 soon, but this work cannot wait until then. Details: ...
0
votes
1answer
205 views

Add sequence numbering based on attributes in a table [duplicate]

Is there a way to auto populate a sequence of numbers based on another attribute in a table? For example, if field "Name" has a sequence of numbers from 1 to 10, and I want to number all the rows in ...
2
votes
1answer
513 views

Using Python in the Field Calculator, how do I refer to a field in another shapefile?

I want to compare the changes in geometry between two shapefiles (of election districts in NYC. One is from 2001 and the other 2005). I am attempting to calculate a new field in the 2005 shapefile ...
3
votes
1answer
2k views

Using Python to Calculate a field

I am trying to replace values in a single column using an else if statement, but I keep getting an Syntax error in line 2. I'm new to Python so it's probably an easy solution, but I haven't been able ...
5
votes
2answers
141 views

Using field calculator to delete specific contours

I have 3 contour shapefiles with 25m, 50m and 100m equidistance. Now I want to delete in the 25m-shp-file every **50m and **00m contour and in the 50m-shp-file every **00 contour. How can I show them ...
3
votes
3answers
587 views

Auto-calculate field (area or formula)

I'm wondering if anyone has any insight into the potential to auto-calculate the value of a field, either area or distance (ideally) or a formula (based on the values of say 2 other fields, or an ...
3
votes
2answers
457 views

How to insert a quotation mark through the Field Calculator of attribute table of a Shapefile?

I have a shapefile of polylines with information of diameter. But the problem is that i didn't enter the inch sign(") with the values of diameter. What would be the solution that qutation mark would ...
1
vote
1answer
736 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 ...
7
votes
7answers
4k 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 ...
2
votes
1answer
861 views

QGIS field-calculator replace function

I've got a Shapefile containing contourlines which I would like to style differently according to their value. For that reason I created a field named "100s" where I would like to give values from ...
0
votes
1answer
137 views

FieldPyculator Plugin - How to concatenate fields?

How can i concatenate two fields using pyculator plugin? There is any document with all pyculator functions that i can use in "field expression"?
3
votes
3answers
363 views

How to make Field Value constant size(length) by appending zeros towards the end?

I have been racking my brain, but I can't seem to find a solution to appending my field values in my .dbf to correspond with the values of my feature's attribute table. All I need to do is to append ...
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 ...
4
votes
4answers
1k views

How to concatenate numbers and add in leading zeros?

I have three text fields populated as follows: 1, 9, 1 that I need to concatenate into a field that looks like 01.09.01. Getting to 1.9.1 is easy but can anyone help out with how to formulate it so ...
4
votes
1answer
455 views

Unit of $length in QGis Field Calculator

I'm calculating field of various features in my shapefile using QGis. I'm getting some sample length as 0.134914579766986. I want to know in what unit (eg: meters, km etc) is the above value ?
5
votes
2answers
413 views

How to add a sequence to the attribute table?

Is there a way to use the field calculator in QGIS to create a range of values in a count sequence with a specified input range? For example, if I wanted to have the values 1 to 5 repeated within my ...
2
votes
1answer
1k views

How to combine If Then with InStr in ArcMap field calculator?

I want to write an if then in field calculator that tests if a field in the attribute table contains one of several versions of another string (the versions vary by capitalization). Trouble is, I ...
0
votes
1answer
502 views

How to use VBA in the field calculator, to copy the last 7 characters to a new field?

Im using ArcMap 9.3. Im looking for a VBA code to use in the field calculator to make a new field of the last 7 digits of a "pin" field. For example. my pin is 00-00-999-999 and i want it to ...
3
votes
1answer
2k views

Elseif Conditional Statement in QGIS Field Calculator

I am trying to write an ELSEIF conditional statement in QGIS Field Calculator (version 1.8.0). I have used an example I found online: CASE WHEN val < 0 THEN 'negative' WHEN val = 0 THEN ...
3
votes
1answer
886 views

How to use field calculator from QGIS Sextante plugin

I am trying to use the Sextante field calculator to calculate a field for a buffer radius using a categorical text field. The formula works fine when I run it using the standard QGIS field calculator ...
2
votes
1answer
542 views

Cursors and Field calculation - Python 2.5 - ArcGis 9.3

I hope my question is not redundant. I wrote a script to Update a table using two imbricate cursors. The goal was 1) to read a records, update some of its values 2) Make a selection based on this ...
6
votes
1answer
2k views

How to measure area correctly?

I have now used my entire evening, but I can't figure out how to make areal calculations (eg. in km2). I have tried the 'field calculator', I have tried the 'measure area' function on the "attributes" ...
1
vote
1answer
135 views

How do you calculate values of a field based on two others using Field Calculator in ArcGIS 10.0?

I need to combine two fields in an attribute table. I want to do this using the field calculator. What is the proper script to write to combine a field called "name" and "type", so that it produces ...
1
vote
1answer
2k views

ArcGIS 10.0 \ arcpy - CalculateField_management : help with syntax for updating text in attribute table of feature classes

I am trying to add (ie "Author", "LastUpdated") to feature classes within a gdb and then populate each of those fields. I have been able to get my code to run properly for the numerical field but I ...
3
votes
3answers
550 views

ArcGIS Field Calculator Python numbering rows of fishnet

I have a grid of 100*100 cells. I want to add to each cell a number representing the row it is in (like in excel). I added a field and want try to solve that with field calculator: The code is ...
4
votes
1answer
534 views

Why can't I multiply two string fields in the Field Calculator by converting them to int() and float()

I'm using ArcGIS 10 and new at python scripting. I have a string field that I need to calculate by multiplying two other string fields. I can do it in python using two arbitrary values... CINPT1 = ...
3
votes
1answer
266 views

Measurement units not returned in project CRS units

I am attempting to calculate area of country polygons using the field calculator. The layer in question is unprojected WGS84, but I have set the project CRS to World Equidistant Cylindrical ...
3
votes
2answers
2k views

using mod() with IF THEN field calculation

I am trying to use the field calculator to assign a "odd" or "even" value to a field of small integers. I usually do this with by selecting where: MOD([field],2) = 0 and then just calculating it ...
2
votes
1answer
463 views

Counting occurrences across a record in ArcGIS 10.0

I'm a student at Millersville University, PA studying for a BA in Geography with a concentration in GIS. I've stumbled across this site for questions I've had over the past year or so with getting ...
1
vote
2answers
2k views

Use Round in ArcMap 10.x Field Calculator on field with both numeric and NULL values

With older versions of ArcMap (9.3, 9.2, etc) I was always able to round numbers down to 2 decimal places using field calculator even if that field had both numeric values and a bunch of NULL values. ...
1
vote
1answer
384 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 ...
3
votes
1answer
235 views

Is there a (better) way to debug Visual Basic Code Block in calculate field using ArcGIS?

From time to time, I have to use Visual Basic in Calculate field. As the code get bigger, the more complicated is to debug it. And ArcGIS (9.3) does not help as the error messages are, in the best ...
2
votes
2answers
512 views

Trimming Specific Text Values in QGIS Field Calculator

Sorry if this is a dumb question, but I am wondering if there is a way to copy the text from one field to a new field, but eliminate specific words. For example: **Old Field** ...
1
vote
0answers
204 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. ...
5
votes
2answers
1k views

ArcGIS 10 Field Calculator doesn't notice selection/Attribute Table problem?

I just have an annoying problem with the Field Calculator in ArcGIS 10. I selected specific points of a Shapefile I want to calculate, but FC is always calculating all fields. Unfortunately there is ...
7
votes
2answers
1k views

Calculating Field based on name of shapefile

I have multiple shapefiles to which I have added a field called "gname1". For each shapefile, I want "gname1" to be set to the name of that particular shapefile, for every feature within the ...
0
votes
2answers
582 views

How to auto populate multiple fields in attribute table?

i have Feature Class Buildings, it has many fields like ...