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

Field Calculator: Error message

Field Calculator: using the x- or yat or (0 "or-1" ) expression, I keep receiving an error: An error occurred while evaluating the calculation string: Index is out of range. I have shut down and ...
2
votes
0answers
28 views

How to save complex expressions in QGIS Field Calculator? [duplicate]

I have been debugging some long case expressions in the field calculator and getting frustrated because I have to remember to copy the expression before I test it otherwise I end up having to reenter ...
3
votes
1answer
67 views

Do pad functions of QGIS Field Calculator have bug?

I have this expression in the field calculator: regexp_replace('1', '^(\\d+)', rpad('\\1', 3, '0') ) gives 01 rather than 001 as expected. the *pad functions work fine when called outside ...
1
vote
2answers
78 views

How can I do more flexible matching in conditional expressions than provided by LIKE?

With LIKE '%' works but I have had no luck with character ranges, i.e. [0-9] to match a digit. Oh for a regular expression ;)
1
vote
2answers
98 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 ...
3
votes
2answers
152 views

Expression to calculate and sort data from several layers into one layer

I am trying to develop an expression whereby one layer can add data from 2 other layers and then rank them, is this possible? I have also tried the problem with using just 1 layer but I cannot work ...
3
votes
2answers
117 views

ArcGIS 10 Field Calculator [closed]

I'm new to GIS in general and field calculator in particular. I have a basic attribute table with three columns. I'd like to assign values to column C based on what is in column A. If Column A = 8 ...
3
votes
2answers
94 views

How To Determine Percent of Matched Data?

In my attribute table, I have 2 columns with qualitative (categorical) data. Both of them are from different sources so I am trying to find the percent of matched data from these 2 columns. I created ...
1
vote
1answer
63 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 ...
3
votes
1answer
98 views

How to find lowest value that is not null using Python in ArcGIS for Desktop?

I have four fields in my table, (A,B,C,D). The field type is double with some fields being NULL. I used min(A,B,C,D) to return the smallest value and it works well if there are no NULL value in any of ...
4
votes
3answers
379 views

How to find/replace element in field with Field Calculator

I just want to perform the following operation done in Matlab into the Field Calculator using Python: p(p==0) = 0.001 ; p(p == 1) = 0.999; tVar = .5*log(p ./ (1 - p)) the operation consists of a ...
3
votes
1answer
108 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 ...
0
votes
0answers
211 views

New values created with QGIS field calculator become null upon saving

I'm having a problem with QGIS. I'm trying to create a new column in the attribute table for a shapefile. The numbers in the fourth column (see screenshots) are currently strings, so I want to convert ...
1
vote
3answers
668 views

How to Convert a Number to Percentage in Field Calculator

Using ArcGIS 10.2 and Personal geodatabase,I have a field with values of Numbers like 0.461538 and Type of "Double" can you please let me know how I can Export them to new Field in Percentage Format ...
4
votes
3answers
6k views

Basic If/Then in ArcGIS 10.2 Field Calculator (Python or VB)

I've been looking through these threads and can't seem to figure out my answer yet. Very new to VBA and Python, but lots of years with Arc.I know I can do this the slow way with Select By Attributes, ...
1
vote
2answers
260 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
117 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: ...
2
votes
1answer
293 views

How to make autoIncrement number start with (001…009, 011…099)?

i have a challenge with my time in my work, i have feature class called "Parcel" storing many data, i generated an autoIncrement number by using field calculator, in field "parcel code" Expression: ...
2
votes
1answer
315 views

How to copy values from field to another using arcpy?

Can some one please let me know how I can do simple field calculation like Copying From "A" to "B" in ArcPy? I have found lots os example on web which they all used extra expression and they were ...
2
votes
3answers
192 views

Calculate Field tool to calculate on null fields

I'm using ArcGIS 10.1. I want to use the calculate field tool in ModelBuilder on a table where if field1 is null, it should take the value of field2. If field1 has a value then it should stay as is. ...
0
votes
0answers
78 views

Bug in Qgis 2.0 Field Calculator with Values from Joined table

I have a data of hospitals. I have two excel sheets, one has no of patients examined in each hospital and other has no. of patients treated in each hospital. I want to find percentage of treated ...
4
votes
1answer
93 views

Are Date columns in feature classes stored as python datetime objects?

I have a Date column called readings_measurement_tstamp stored in my feature class. I would like to add a String column to this feature class and Field Calculate it to be be just the %H:%M:%S ...
0
votes
0answers
66 views

Populate a new field with list of the top 5 values of all fields for that record

I have 15 fields. I would like to add a new field that is populated with the field name and value of the top 5 highest values of the 15 fields for each record in the table. The new field would be a ...
5
votes
1answer
71 views

Calculate difference between values in linear order using ArcGIS

The best way to describe this without knowing Python or VB jargon is to add these screenshots. I would like to emulate this Excel calculation in ArcMap10.1. MEAS is the distance along my route and ...
1
vote
2answers
833 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
66 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 ...
0
votes
0answers
14 views

Unique referencing based on Co-ordinates

I have a list of 400 nodes, all split across 'maps' which are gridlines 1000x1000m. Each grid area is referenced by the first 3 digits of the X value of the centre and first 3 digits of the Y value ...
3
votes
1answer
212 views

Can't compute area of shapefile in field calculator

This shapefile represents the counties of NM. I am trying to compute the area of each polygon (yes, I know there is an area field, but this is a simpler example of a problem I'm having which doesn't ...
4
votes
3answers
3k views

How to replace null values in attribute table ArcGIS 10.2

I have a string field 'Oneway' with three values '+' '-' and Null showing a street accessibility, I would like to replace them with values 'F' 'T' and null as the script for Network dataset expect ...
0
votes
1answer
192 views

Field Calculator - replace string function - data value recognised as a column and is “not found” [closed]

I have the same challenge as GrahamD - Field Calculator - replace string function I have exactly the same challenge. Exactly the same as GrahamD's challenge, p abbreviated for pan. Type_2 as a test ...
0
votes
2answers
378 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 ...
4
votes
2answers
82 views

How to replicate trunc function on QGIS?

I've search a bit before asking this question, but I haven't found the answer. Is there a Trunc function on QGis? I've tried using floor, but it doesn't work (like I want) if the number is negative, ...
1
vote
1answer
173 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 ...
2
votes
2answers
125 views

Field Calculator, Conditional

I am trying to assign Value from one field of my Attribute table to a new field based on the 3d field.... The Code Block I am thinking about as follows: *def conditional (!FarmCateg!): if ...
3
votes
2answers
480 views

If-Then Statement in Field Calculator

Scenario: I have four fields: A, B, C and D Field A is text-based and contains values from '000' up to some number 'xxx' Field B contains a set of values (also text, but represented by numbers) ...
0
votes
1answer
112 views

Is it possible to calculate a value based on values of another row?

I have a point shape file in qgis. For one of the attributes, I would like to offset the values, i.e. the value for point 1 goes to point 10, the value for point 2 goes to point 11 and so on. I see ...
2
votes
1answer
94 views

Populate an attribute table field using the 'startswith function

I am hoping that someone may be able to help me. I am new to ArcGIS, and even newer to Python. Working in ArcGIS 10.1, I have done is created a new text field in an attribute table, which I have ...
4
votes
2answers
179 views

Changing default parser in ArcGIS Field Calculator to Python?

Is there a way to change the default parser in the Field Calculator to Python? So annoying to always change now that I'm trying to move away from using VBScript... I'm using ArcGIS 10.1 for ...
0
votes
0answers
190 views

Select Expression and Field Calculator in ONE STEP with QGIS

I have an Open Street Map Shapefile and i want to use Field Calculator to add information to a field called a800900 according to the field TYPE of street, by different area (field called ID_2). The ...
1
vote
1answer
169 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 ...
4
votes
1answer
541 views

How to use the Intersects function in the Field Calculator of QGIS?

I would like to have an example on how to use the Intersects function in the Field Calculator of QGIS. Basically, I want to know which feature from a polylines layer intersects a polygons layer and ...
1
vote
2answers
207 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 ...
0
votes
0answers
101 views

Doubt in Field Calculator

I am working in an project.I have a point Shapefile its projection is NAD83(HARN)Pennslyvaniasouth(ftUS)*EPSG3365* when I measure its distance(between two points) it gives me the answer in feet .yes ...
3
votes
3answers
454 views

How to create button that calculates acres on selected polygon features?

I'm looking to create a simple button that calculates acres on selected polygons and can't quite find what I'm looking for. I read through this thread: automating a python script..., but found it ...
1
vote
1answer
256 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 ...
3
votes
3answers
182 views

ArcGIS 10.1 : Returning shape.area in my code block

I try to calculate a field using an 'if' statement in the field calculator. Here is my code : " #Expression MyField_2 = def Reclass(!MyField_1!) #Parser Python 9.3 #Code Block def ...
5
votes
1answer
1k views

Python If else statements

I'm trying to populate a field from another. The catch is that it isn't 1 or 2 values. If my field A = 4 then I want it to return field B to 0. But if Field A is 1, 2 or 3 then I want the user to be ...
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
86 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.
4
votes
2answers
656 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 ...