Field calculators (available in QGIS, ArcGIS Desktop, etc) can recalculate the values of a single field on all, or selected, records within a table using an expression.

learn more… | top users | synonyms (1)

0
votes
0answers
19 views

wanting to calculate percent in arcmap

I am a geomatics student. I am currently trying to figure out the percent of building permits issued in each disseminaton area. I am not sure what to type in the field calculator window to make this ...
0
votes
2answers
37 views

ArcGIS Python if statements say field not nullable?

I am creating a new field - let's call it A (SHORT INTEGER) in shp file using Modelbuilder and I need to fill it it with the values from two different fields. First step is to fill field A with the ...
1
vote
1answer
42 views

How to use QGIS field calculator between different points of same layer?

I'm in a course learning about GIS systems, and we have recently recorded a gps track. I've exported this track as .gpx and imported the points into QGIS. Each point has a timestamp. One of the ...
-1
votes
0answers
18 views

Error 000539: Field Calculator autoIncrement script - need assistance to fix the following test script [on hold]

lastValue = 0 def autoIncrement(newValue): global lastValue pStart = 1000 #adjust start value, if req'd pInterval = 1000 #adjust interval value, if req'd if (lastValue != newValue): ...
3
votes
0answers
30 views

Field Calculator convert text to integer then populate new field with sum

I have a .dbf with about 50 text fields containing numerals, I would like to convert those to integers and then sum them all in a new double field I created, is there an easy field calculation that ...
0
votes
1answer
34 views

Using field Calculator for time in ArcGIS 10.2

I have a new field in a shapefile with the property "Date". I want to fill it with "9:00:00 AM". I tried several ways of using field calculator, but it gives date instead of time. How could I do ...
1
vote
2answers
30 views

How to remove a certain number of digits from the front or end of an attribute field?

Can I use the filed calculator in QGIS somehow to remove the first 4 numbers in all attribute fields in a column? Example 16011234 -> 1234 EDIT: Silly, I can just subtract with 16000000 in this ...
1
vote
1answer
23 views

Using “calculate field” in python script fails to display Arabic characters correctly

Using “calculate field” in python script fails to display Arabic characters correctly. I have exported the modelbuilder to python script, but unfortunately the Arabic characters cannot by displayed ...
1
vote
1answer
44 views

Calculate area intersected areas, problem

(I'm working in QuantamGIS) I intersected two layers creating a new layer. Within the attibute table of this new intersect layer i would like to calculate the new areas. However, it just doesn't ...
0
votes
1answer
34 views

Combining and extracting attributes from 2 columns to populate a third (Concatenate)

I am working with a FEMA flood zone shapefile which contains a FIELD_ZONE field and a SUBTY field. I created a third field called ZONE_TYPE that needs to be populated by combining or extracting ...
1
vote
4answers
176 views

Python script for Field Calculator. ArcGis 10.2.2

I have a point shapefile with two columns i want to process. The first column is aspect and the second is aspect_m60, there is only one row with the aspect of my point. I have tried to write a script ...
3
votes
1answer
51 views

How to summarize a column in QGIS field calculator

I have data with a column containing a number value, and I want to divide the value of each feature by the total sum of all the values in the column (to get a percentage). So I would like to know if ...
0
votes
1answer
30 views

How can I make attribute table field dependent? [duplicate]

In an attribute table I am making new fields bounded each other by the Field Calculator. Once I have written the formula for the new field in the Field Calculator, ArcGIS make the calculation for the ...
0
votes
1answer
42 views

If statement problem in Field Calculator - Arcgis

I have a field entitled "Lung_lunc". It contains some "0" values and the rest are values > 0. I want to turn those "0" values, into "0.0001". I have added a new field: "Lung_lunca", and I want to use ...
1
vote
2answers
93 views

How do I add rows together to populate a new field?

How do I add the values in columns 11_acciden, 12_acciden, 13_acciden, and 14_acciden in order to populate the total_acci column?
1
vote
1answer
48 views

How to fill the column in attribute table with same values?

I have about 19000 records, I added new column and I would like to fill it with string values (eg. brand)- same value for all rows. I'm not considering copy/paste. I know I could do it with exporting ...
1
vote
2answers
59 views

How to assign a unique ID to groups of items in the attribute table in ArcMap?

Using arcmap's field calculator I need to programatically loop through all of the entries in the field and for each name it gets its own unique id. So names that are the same would get the same ...
1
vote
1answer
40 views

ArcGIS Field Calculator nested elif is None not working

I am calculating a field based on two other fields in ArcMap 10.2 using python. My Pre-Logic Script Code is def myfunc(legend,Btype): if(legend == 'Apple'): return 'Banana' elif(legend == ...
2
votes
2answers
164 views

Performing math in Python parser of ArcGIS field calculator?

I never used python but now I need a code to do this calculation: I'm doing this: math.atan(math.fabs( !Y2! - !Y1!)/math.fabs( !X2! - !X1!) )*(180/math.pi)
2
votes
1answer
49 views

How can QGIS Field Calculator sum values from a spatially joined table?

Can the Field Calculater be used to sum values from a related table via a Spatial Join? I have two vector polygon layers A and B, each with a numerical column VALUES. I want to update VALUES in ...
0
votes
1answer
29 views

Combine string and OBJECT ID

I would like to update the Map_Feature_ID field with a String " WP_" and then follow the "WP_" with the OBJECTID field. So I will end up with "WP_1", "WP_2" all the way to the end in the Map Feature ...
-1
votes
1answer
74 views

Rewriting VB codeblock as Python for ArcGIS Field Calculator?

I am looking for assistance to rewrite my VB codeblock into Python. Im on Win7, Arc10.2 and Python 2.7 The code below works fine for me, I am simply looking to port it to Python so i can progress down ...
1
vote
1answer
35 views

Coordinates for specific points calculated in QGIS Field Calculator?

I have got a layer in QGIS that is comprised of connected points which define regions of a country, thus the attribute table consists of 38 regions while the number of nodes in this layer is about ...
0
votes
1answer
50 views

Using Python parser of ArcGIS Field Calculator to populate values in one field based on those in another?

I am trying to populate a field with a sorting code that represents the value of another field. Example: EXPCODE|SORT| S4DNN2 |3.5 H2BNN2 5.0 EXPCODE is a field with a value like "S4DNN2." SORT ...
1
vote
1answer
42 views

Getting and using XY centroids in ArcGIS Field Calculator using Python Code Block

I am writing a script to obtain Grid reference but cannot fathom how to get XY centroids without creating new fields (all examples I have found are based on writing XY centroids to field). Here's ...
1
vote
1answer
43 views

Using defined function code block with Python in ArcGIS

I am running a Field Calculation within a Python script in ArcGIS. Within this Field Calculation I am calling a defined function within a code block. Here is the dialogue that I ran and works: ...
2
votes
2answers
87 views

How to add multiple python expressions in field calculator

How would I add multiple python expressions in the ArcMap Field Calculator if possible? I tried separating each expression on a new line and also separating with a semi-colon but neither worked. ...
1
vote
2answers
51 views

How to add “0” to multiple parts of text value in Field Calculator with Python

I have values in a text column that are as follows: 000_100 100_200 ... 1000_1100 1100_1200 I want it to read: 0000_0100 0100_0200 ... 1000_1100 1100_1200 I want all values to have the ...
0
votes
1answer
71 views

if-else logic expression in field calculator

I want to calculate the value of a new field using an if-else condition with field calculator in modelbuilder. Want I want to do is as follows: if my new field is empty, then use the expression ...
0
votes
2answers
47 views

in attribute table [closed]

Rows consist of letters and numbers that had 6 strings expression. I want to group these rows according to at least 3 strings be similar. How can I do?
1
vote
0answers
29 views

Network Anlayst hierarchy evaluator [closed]

Working with ArcGIS (v10.2.2) Network Analyst and reformating the road network with a hierarchy evaluator and receive the following error message: The field evaluator result statement has multiple ...
1
vote
2answers
291 views

Calculate field

I am working in ArcMap 10.2 and would like to calculate a field. The output should be the value of 'field 1' only if 'field 1' has a value 0 or it should give the value of 'field 2'. How to do ...
1
vote
4answers
80 views

How to remove period, comma, symbols using field calculator?

I want to delete . , # in attribute table using field calculator (VB Script or Python). How can I remove these using this example address: N. First St., Unit #1 (I don't need city or state name) I ...
0
votes
1answer
43 views

Iterate through all fields in attribute table and multiply by field

I have a table with a whole bunch of census variables (race, age, education, etc). I want to multiply all of these fields by a factor that I calculated. For example: Field1 has values of 10,20,30,40 ...
2
votes
1answer
36 views

How to change GK-coordinates to UTM with the field calculator in QGIS?

i have a qgis project in ETRS89 (UTM) with some vectorshapes. i already transformes them from GK into UTM. but now the attribute table still show me the GK-coordinates. HOW can i change it? with the ...
0
votes
1answer
75 views

Problem with addιtion abstraction in Field Calculator

I want a bit analytical respond for the mistakes I have done in my code cause I am new to programming. I am using ArcGis 10.2. and I must process a field with distances in an attribute table I have. ...
4
votes
1answer
212 views

Converting 12-hour time to 24-hour time using Field Calculator

Does anyone know how to convert string time formats in ArcMap v10.2 from 12-hour to 24-hour using a simple query in the Field Calculator? i.e. NO Python, NO editing in Excel, NO changing my Windows PC ...
1
vote
1answer
56 views

Attribute table not updating after QGIS field calculator used? [closed]

Using QGIS 2.8.1 i am trying to update an attribute table using the field calculator. its a vector layer of vegetation communities. i am trying to update the area fields in the table. The output ...
2
votes
3answers
117 views

How do I normalize the values in a single Field (from a table) in ArcGIS?

First of all, this is my first post, and I would like to appreciate all the useful information I have found so far on this site. Second of all, I have encountered a problem, in Field Calculator. ...
1
vote
1answer
42 views

Concatenating fields while also replacing values within certain stings [closed]

I am trying to use python to concatenate multiple fields in a polygon layer. Specifically, I am attempting to combine the values of four fields into one: EXPCODE = !MATRIX! & !PLANT! & !PCT! ...
2
votes
2answers
58 views

How to convert negative field values to positive?

I have an xyz file that I want to convert negative field values in the z column to positive values. How do I do this with field calculator?
2
votes
3answers
70 views

How do I use the field-calculator in QGIS to return the name of a country from a different shapefile?

I have a shapefile that consists of a list of archaeological sites with the x and y coordinates. I have an Natural Earth shapefile for the countries of world. I was wondering how I go about ...
0
votes
1answer
24 views

ArcGIS do calcuation on multiple input fields of attribute table and the number of input fields is changing

I have attribute table with headers: ID(bgrp), F1 (F2011_46), F2 (F2011_48), ...Fn I want to do math calculations on the fields from F1 to Fn. For example, count the total number of non-zero Fn ...
1
vote
0answers
18 views

Incorrect Acreage QGIS 2.6.0

I have six polygons, all of (fairly) similar size. The first one is 8 acres, the others are obviously wrong with 120,000 acres, and 106,000 acres and so on. I am calculating with the field calculator, ...
2
votes
1answer
26 views

Polygon shapefile field calculator problem

My project is set in WGS84 only, and I have checked 'enable on the fly'. I have created a polygon shapefile and my problem is that when i use field calculator in the attribute table on my polygon ...
0
votes
1answer
26 views

Raster Calculator or Local-Combine tool? (in ArcPy)

i have 3 classified rasters and i wanted to use the following query from r. calculator: (rclslope>=45) & (rclmosaic>=2000) & (rclfocal>15) to arc.py how can i write it? Is it ...
0
votes
4answers
107 views

Concatenate string data plus numeric data in Arcmap 10.2.2

I have three attribute fields (Address_No: 1, StreetName: Main, Street_Ty: ST) that I want to merge together. How do I concatenate string data found within the table plus numeric data? I would like ...
1
vote
0answers
31 views

Systematic inaccuracy in QGIS shape area

I’m trying to find out why I get different area figure in QGIS than in AutoCAD when I’m using the same shape file? What I did is I drew a shape in AutoCAD, imported it in QGIS and used the field ...
1
vote
1answer
37 views

How can I allocate a $rownum in reverse order in QGIS?

How can I allocate the $rownum value in reverse order in QGIS? I have a created a grid layer to use in an atlas and the ID allocated is from top left to bottom right - which is what I want if I want ...
1
vote
3answers
67 views

Calculate field management not working within customized Python tool in ArcGIS

I am trying to make a custom made Python Script tool which I would like to use in Model builder. I am using the arcpy.Calulate_field_management function (simple reclass function as an example), but it ...