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
3answers
349 views

Automatically assign numbers to point file in various order in QGIS

I know how to automatically assign numbers to a new point files using the $rownum function in the field calculator. However it does it from the top-left over and down like reading a book. I could ...
1
vote
1answer
51 views

Python in ArcGIS, CalculateField_management, updating with single value

I have a float field which I want to simply update all values with 1. I can easily do this within the field calculator but I have started using python today, what is the syntax to simply update a ...
1
vote
2answers
56 views

Iterate through each county in a shapefile, select the county and make a second selection by location - modelbuilder

The goal of my project is to create a table with two fields. The first field showing a county name and the second field listing every county that touches the boarder of the county listed in the first ...
1
vote
1answer
41 views

Use field calculator in QGIS so get number of points in polygone and store it in attribute table

I have to layers, one point one polygon (with 6 areas) stored as shapefiles. Now I want to count the number of points in each area and write it into the attribute table of the polygons. A column ...
1
vote
2answers
166 views

How to fill attribute field of one feature based on calculation on attribute field of another feature

I would like to fill an Attribute field of a geodateabase table based on some calculations such as 'sum' over specific field of another Feature class. Is there an Approach to formulate it? while in ...
1
vote
1answer
111 views

How to concatenate XY values in attribute table without messing up the numbers in ArcGIS 10.1?

Here's the procedure I use and the resulting problem I'm having. First I use the Add XY coordinates tool to add POINT_X and POINT_Y fields to the attribute table of a point layer. I then add a new ...
1
vote
3answers
279 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. ...
1
vote
1answer
85 views

Stuck updating one field based on the condition of another using Acrpy or Field Calculator

I have a shapefile with 5,000 city points. I need to populate a new field, "cls_pop", based on each cities population, so that cities with a population > 2,000,000 will have "cls_pop" = 1, cites with ...
1
vote
2answers
275 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
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 ...
1
vote
1answer
797 views

Concatenate Fields into One Field in QGIS

I have seen some posts on this, but only for ArcMap. I am looking to take a range of values from two fields and concatenate them into one field to make a unique value. For example: XMAX YMAX ...
1
vote
2answers
362 views

FieldPyculator Plugin - How to Classify Fields?

Could someone tell me how to classify/populate fields with QGIS FieldPyculator Plugin? In the Attribute Table, I have a field named POPULACAO with population data: I want to apply a weight to ...
1
vote
1answer
211 views

Small issue with field calculator

What am I doing wrong in this field calculator logic? Pre-logic def re_score(elev_t,f2, contour): f2=contour if elev_t.endswith('.5'): f2 = "Midi" return f2 Expression for field "Contourtyp" ...
1
vote
1answer
331 views

How to tranform a column field into a list using Field Calculator

I'm trying to make a simple field calculation with ArcGIS 9.3: New field = Old field - Old field(first value) which in Calculate Field with python code should be Expression: !Old field! - first ...
1
vote
1answer
26 views

Arcgis 10 assign values to field based on values in other field [duplicate]

I have a table with two fields A and B, and i want fill field B with "some values" from field A: FieldA: 123456_CC; 123_D; 1234567_AB; 123456768_F I just need the "text" that is associated with the ...
1
vote
1answer
19 views

Does ArcGIS Desktop have conditional function useable in field calculations?

Does ArcGIS / ArcView 10 have a conditional function, e.g. ifx(test,if_T,if_F), that could be in-lined in field calculations?
1
vote
2answers
70 views

Calculate field based on most frequently occuring text/value in other fields in attribute table (ArcGIS)

I was wondering if anyone knows if it is possible to calculate a field based on the most frequently occurring value in other fields. What I have is 5 fields with crop information over 5 consecutive ...
1
vote
2answers
71 views

How to add a new column in attribute table with attribute with indexes of another max-min ordered attribute field?

I've an attribute column named e.g. VALUE with different values I would like to make a column named e.g. ORDERsuch that the greatest value has the attribute 1 the second value 2 etc. etc. so order ...
1
vote
1answer
107 views

Cursor Update Python Script for Multiplying Several Fields against a Ratio (Real) in ArcGis

Disclaimer: Python Neophyte, Uber-reliant on GUI, working to wean... I have a Python script for replacing multiple Field values with another table value that was graciously provided by the inimitable ...
1
vote
2answers
134 views

Using a different projection to calculate areas using the Field Calculator

I have a dataset that is in a WGS84_UTM projected coordinate system, can I force the Field Calculator to use another coordinate system when I use it to calculate areas using pythons ...
1
vote
1answer
106 views

Convert a number in attribute table to binary

I would like to convert whole integers from decimal to binary in ArcGIS using the field calculator. I am looking for the equivalent of DEC2BIN excel command. All values are 255 or below so 8 bit is ...
1
vote
2answers
125 views

Stop rounding values in Qgis attribute table

I am calculating the areas of my polygons in Qgis using $area and everything works fine until I click on "save". All my values are rounded to an integer. I tired setting the output field type to ...
1
vote
1answer
67 views

How to move a value from field1 to field2 using Field Calculator?

Hi I would like to move value in field1 to field2. Purpose is to after that delete the column 'field1' to get a better column naming standard /Jan
1
vote
1answer
395 views

How do you calculate a column value based on the value of another column?

I am trying to select data based on whether it starts with certain characters and then update a field. For example if [Asbuilt] starts with "WL" then do something. Here are the two methods I have ...
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. ...
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
2answers
1k views

ArcGIS field calculator: VBScript get data from previous row

When using the field calculator, how do I get data from the previous row in VBScript? In Python I'd do something like this: for index, row in enumerate(rows,start=1): row[index-1] += 5 I'm ...
1
vote
1answer
75 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
2answers
30 views

How can I populate a field of the polylines to indicate if they intersect?

I have two feature classes, one ploylines, one a buffer. How can I populate a field of the polylines to indicate if they intersect?
1
vote
1answer
77 views

Field calculator uses wrong fields when working with joined data

I am having an issue in qgis table joins. i have a joined a csv file to a sqlite database and common id is used for join. the join is displays correctly in attribute table. the attributes in sqlite ...
1
vote
1answer
80 views

Problem in long expression in field calculator

I am trying to compute the following expression with Field calculator. The input table values are around the size of this value: 562643580,7843, and the field name (the field of destination) is: ...
1
vote
1answer
103 views

Is there a way to automatically calculate attribute values for new features?

I am creating a vector point layer which will be added to over time. I have been using the field calculator to populate fields such as X and Y coordinates. I'm wondering if there is a way to have ...
1
vote
1answer
106 views

Help with field calculator in Python script

I am getting a syntax error in my script but I know from testing it in ArcMap attribute table, the syntax is fine. Anyone have any idea why this code doesn't work? I see that a search cursor has been ...
1
vote
1answer
125 views

Field Calculator returning incorrect length and area values

I can get accurate lengths of line features and areas of polygon features using the "Measuring Tool" in a QGIS project. However, when I attempt to generate length or area data in Attribute Tables ...
1
vote
1answer
95 views

Why do area measurements from “measure area” tool and field calculator differ?

My problem is when using the "measure Area" tool on the toolbar I get the correct value but when using the field calculator in the Layer Attributes the area is very different including -ve areas. ...
1
vote
2answers
134 views

VBA ArcGIS 9.3 Field Calculator: 'countif' across several fields

I have an attribute table with 15 columns that contain either a '0' or a taxonomy number. I would like a summarized column that shows the number of different species. location type1 type2 type3 ...
1
vote
1answer
82 views

How to perform intersect operations in the Field Calculator in QGIS?

How to use the Intersect function? How would I specify to REPLACE layer1.field1 with layer2.field2 WHEN layer1.geometry INTERSECTS layer2.geometry Is that feasible in QGIS?
1
vote
1answer
72 views

How to correctly use LIKE in the code block of a Reclass expression in ModelBuilder Calculate Field

I have a Reclass expression that works when i am search for single instance of a data field. I also wish the Reclass to work with a SQL type LIKE selection with Wildcards. e.g. I need to reclassify ...
1
vote
1answer
121 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
172 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
89 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
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 ...
1
vote
1answer
89 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
1k 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
1answer
79 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
30 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
51 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
67 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
1answer
297 views

Using Calculate Field (Data Management) tool to calculate 3D Length in ArcGIS 10.1

I'm relatively new to the world of model builder and scripting, so it's likely there is a very simple solution to the question I've been trying to figure out. I'm trying to create a tool that takes ...
1
vote
0answers
373 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 ...