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
48 views

Ádvance Python Field Calculator - Global Expressions [duplicate]

I am trying to create a global expression that populates a new field based upon existing values in an attribute table. I am using QGIS Dufour and the Sextante toolbox, and the "Advanced Python Field ...
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
302 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
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. ...
4
votes
1answer
73 views

Area calculation of an object without coordinates

I have a photo of an object with a scale and I want to calculate its area. I guess I have to create a polygon of the area to be calculated to use the 'field calculator'. But how do I tell the program ...
0
votes
0answers
51 views

Problem with field calculator

New to QGIS and suspect I'm missing something basic but.... When I input the formula to create a new field, all the calculations are correct but when I press the "Save Edits" button, all the figures ...
2
votes
1answer
69 views

Remove characters inside parentheses in QGIS

I have a shapefile of the buildings on my college campus. It has a "name" field that includes the name of the building and then in parentheses the building's campus address (i.e. Health and ...
1
vote
2answers
136 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
108 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 ...
0
votes
1answer
120 views

Conditional Calculation of a text Field Value Based on antoher text field value ArcGIS10.1 [duplicate]

I Created a new field to explain some zoning codes in an attribute Table. I basically want the new field "Zone" to have a string value based on the field "Zoning" For example if the "Zoning" field ...
2
votes
1answer
122 views

How to assign values to field using if/then logic involving multiple fields?

I want to run a field calculation on a string field named [territory] that first looks at a string field [majr_src] to see if there is a value other than "NONE", if so [territory] = [majr_src]. If ...
2
votes
3answers
80 views

How to write FIDs of points within each polygon to polygon field?

I have two feature classes one with points one with polygons (in ArcGis 10.2). Now, I want to write into a String Field of the polygon layer a list of all the Point-FIDs that are within each polygon ...
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?
2
votes
1answer
105 views

Batch Update Fields in Field Calculator or Model

I have a dataset of block-level census data that I clipped to an Illinois State Senate district. To update the data (e.g. for population) I'm applying an area multiplier, i.e taking the area of each ...
3
votes
1answer
1k views

What expressions for QGIS field-calculator?

I do not understand what language I have to use in field-calculator and labels on QGIS: SQL or Python? And where I can find the possible script/expressions to use? in the image you can see the ...
3
votes
0answers
56 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 ...
1
vote
1answer
204 views

How to sum up multiple columns values into one single column

I have one table containing many columns. Using field calculator, I want to create a new column containing (for each line) the sum of all columns values. Pretty dumb, but just cannot find the correct ...
3
votes
1answer
373 views

How to use the field calculator's centroid() Geometry function in qgis 2.0?

There is an option in the field calculator for centroids under geometry which when you double click gives you "centroid( ". What information is required here in order to use this function?
0
votes
0answers
154 views

Using Field Calculator to Calculate a Mean for Multiple Rows

I am trying to calculate a mean across a multiple number of attribute rows and have this value added to a new field that I have entered in the attribute table. I have an attribute table which has a ...
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 ...
5
votes
1answer
1k views

How to perform If Statement in Field Calculator of ArcGIS for Desktop?

I have a shapefile containing two numeric fields ("Dist_1" and "Dist_2"). I want a Field Calculation that will populate an additional field ("Result") with one of three answers: First if Dist_1 is ...
1
vote
1answer
73 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 ...
0
votes
1answer
199 views

Arcpy CalculateField using formatting syntax

I have 2 feature classes (FC) that I am merging together and then performing some field calculations on. The 1st FC has 100k+ records in it, and the second FC is a blank FC that I'm using as a ...
2
votes
2answers
134 views

Correctly calculating attribute table column in gvSIG

I am trying to conduct a multicriteria evaluation, and it is necessary to check the compatibility of two different land-use types that I have in seperate layers. I am working in gvSIG 1.12, and have a ...
2
votes
1answer
176 views

How can I refer to a model variable in a Field Calculator or Pyculator formula?

I am new to QGIS 2.0.1 Modeler (Sextante) and not very able in Python programming. My question regard the use of field calculator (or advanced python field calculator) inside the modeler. Is it ...
1
vote
1answer
112 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 ...
0
votes
0answers
58 views

Import csv file and use “toggle editing” and “field calculator” without Saving it as a Shapefile.

I am importing a .csv file in QGIS and I have also made the *.csvt file where I have specified my data types. I still cannot use "Toggle editing" and "field calculator".Whether I must save it as a ...
2
votes
1answer
219 views

Calculating a field based on two other fields, if they exist [duplicate]

I'm using ModelBuilder to iterate through ~800 shapefiles to add and calculate a new field (I'll call it Field_A). Field_A needs to be populated by either Field_B or Field_C, whichever exists. Half of ...
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 ...
4
votes
2answers
130 views

Can Hyperlink be based on two fields for path and file name separately?

I need to create a hyperlink field. I have one field with the file name, and another field that contains only part of the file path (the real path is unknown). The table contains 14,000 records with ...
3
votes
1answer
264 views

Calculate Field python code has “Expected end of statement” error

I am creating a line shapefile from a csv in a Python (2.7) script. I am assigning an ID field from the csv to a variable and then later using it in the Calculate Field tool. The ID field originally ...
0
votes
1answer
105 views

Problem in calculating length

I am Digitizing road line in India using open layer plugin.When I calculate the length of line using field calculator it gives me the result in millimeter . I thought it is the projection problem and ...
2
votes
3answers
226 views

How to count occurrences of one field grouped by values of another?

Is there a way of calculating the number of unique text strings in a field in ArcGIS 10.1? I have a number of repeated strings in this field, but would like to calculate the number of unique strings ...
2
votes
2answers
486 views

Use Feature Class “Name” from Iterate Feature Classes to Calculate Field with Model Builder 10.1

My goal is to create shapefile that contains merged feature classes from a geodatabase. I would like for there to be a new field in the resulting shapefile that contains the name of the original ...
5
votes
2answers
168 views

Field calculator script to work out first 5 dominant area fields?

I have 5 fields of different landcover types with areas of each and found below: > PRC_Water| PRC_Bare| PRC_Urban| PRC_LVeg| PRC_LVeg| > 5 20 40 20 15 I have ...
2
votes
3answers
275 views

Python script for identifying duplicate records (follow up)

I am trying to calculate a field that marks duplicates and sequentially numbers them. I am using the code below that I found here: Generating sequential numbering for duplicate values in a field ...
1
vote
0answers
376 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
2answers
90 views

Creating a new integer field based on text in a different field - ArcGIS 10.1

I need to create a new integer field based on another text field. All instances of a the same text string in the existing field should be assigned the same number (starting at number 1). Can I do this ...
1
vote
3answers
282 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
2answers
202 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?
2
votes
2answers
177 views

Is the derived area/length/xy values of a polygon/polyline layer in QGIS usable?

I have a raster that is projected to a state plane CRS and I am adding polygon/polyline shapefiles that are projected to WGS84. On the fly transformation is set to reproject to my raster CRS. When I ...
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 ...
2
votes
1answer
182 views

Generating sequential numbering for duplicate values in a field sorted by ObjectID

I am trying to figure out a solution to an field calculation problem. What I'm trying to do is automatically (using either ArcPy or the Field Calculator) generate sequential numbers, beginning at 1, ...
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 ...
5
votes
1answer
266 views

Translate Excel formula to be used in field calculator

I have a series of equations to create corner points to make rotated polygons based on angles in the attribute table, but I have created it in excel and can't figure out the syntax to get it to work ...
0
votes
0answers
78 views

Automatic update of field calculator. [duplicate]

When I calculate length or ID it is only for the existing data but not doing it for new entry. How can I make the fields calculate current/data?
0
votes
1answer
91 views

Python: using CalculateField_management for duplicating attributes with a double quotation mark

I am writing a python script which duplicates a field. The field contains names of pipelines but some of these names has double quotation (ex. 8" NGL PIPELINE). I have created a new field and trying ...
0
votes
2answers
157 views

Field Calculate with a function written in python within a larger python script

I'm writing a python program where I need to field calculate using a python function. The function takes two strings; one used for an if statement and the other to become an integer complete a simple ...
2
votes
1answer
270 views

How to use Field Calculator to calculate area as percentage?

I am searching for python code to use in Field Calculator to calculate area as a percentage in relation to another field? The area percentage needs be calculated based on the total area for each ...