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)

1
vote
2answers
184 views

Using Python in the field calculator - if/else over multiple fields

I'm trying to work out how to populate a field depending on the lowest score across 6 other fields. I've read several other questions relating to if/else statements but I'm only just starting to learn ...
1
vote
2answers
122 views

Setting field equal to raster Name ID for batch process in ArcPy

I am wanting to set an existing field called RasterID to the name of the raster for which the attribute table belongs to, but for a batch of rasters. Is there a way to do this with my current code ...
-3
votes
2answers
80 views

Using ArcGIS field calculator? [closed]

This field calculate returns an error, whats wrong with it? def Reclass(A): elif ( A>= 0.208113 and A <= 0.261517): return "Low" elif (A > 0.261517 and A < 0.301951): return ...
0
votes
1answer
245 views

Populating a field in an attribute table with a consecutive number sequence? [duplicate]

I know that this is probably a very basic question but I cant seem to find an answer through Google searches. I would like to create a field in an attribute table (in ArcMap 10.2) for a Number Label ...
3
votes
2answers
154 views

How to pad field with blank spaces using calculate field tool of ArcMap?

I am trying to pad the right side of a field with blank spaces so that when I label the field, it labels further over to the left. The only way that I can seem to make this work so far is by adding a ...
0
votes
1answer
100 views

Calculate values in one field based on values in another field

I have one field with Zoning Codes (i.e.: RS) and I want to update another field with the string "Residential Single Family". The new field is currently NULL, I would like to add the full text string ...
3
votes
1answer
85 views

Joined tables and now field calulator is greyed out

In ArcMap (10.2), I accidentally calculated the wrong field outside of an edit session, so there was no way to reverse my action. I restored a previous version (shadow copy) and joined the tables ...
7
votes
2answers
328 views

How to find if polygon has a hole using field calculator in ArcGIS

Some 3rd party software cannot handle polygons with holes (donut polygons). To find them I always use ArcView 3 field calculator, because: however when I try to do this in ArcGIS, I get this: So ...
0
votes
1answer
38 views

Sum a field, and take that sum and use it to populate an existing field in the same table

I am trying to break down land uses in a watershed by making a tool in ModelBuilder. Right now I am clipping a land use layer by a watershed polygon, dissolving land use layer by land use code, ...
1
vote
3answers
461 views

Extract numbers from string field

I am trying to calculate field test2 with only the numeric values from a string field test. The entire script is like: def makestr(test) list=[] for s in test: if s.isdigit(): ...
1
vote
1answer
64 views

How to fill column with several conditions using QGIS field calculator?

I know the synthax in order to fill one field with only one condition (field calculator): case When "attribut" = 'value' then value End But how to do populate automatically one field with ...
1
vote
1answer
77 views

Multiply whole column with the field calculator in QGIS

I have a layer with the field size. I did some mistake with the value and now I need the values multiplied by 16. But instead of going through 500 lines and recalculating them I would like QGIS to do ...
3
votes
3answers
258 views

Calculating file name with field calculator

Is it possible to calculate the file name in an attribute table? My shape file has a name like "cities.shp". In this shape file I want to have a attribute "cities").
1
vote
1answer
31 views

How to update the value of a field dependant upon the the fields ID in QGIS Field Calculator

I am looking to create links to website pages and to automate the procedure a bit more I would like to have a standard link followed by the ID of each field. For example, I would like the standard ...
2
votes
3answers
108 views

Prefixing multiple values within QGIS using the Field Calculator?

I have a column in my my attribute table that contains a series of individually numbered locations. I wish to prefix all of these numbers with a letter, this letter will be the same for each of the ...
0
votes
1answer
67 views

Changing field values using arcpy

Say I want to make my field buff_dist longer than by 400ft, I want to write a code that will go through the table and change the field value by adding 400ft to it's value. How would I write that? I ...
3
votes
1answer
162 views

Accumulating values of date field using Python parser of ArcGIS Field Calculator?

I would like to modify the following accumulative/sequential python code sample in field calculator in a Date Time field. I think this is the correct code to use but let me know if not. The Date Time ...
2
votes
1answer
547 views

Converting values in datetime field to strings in text field using Python parser of ArcGIS for Desktop?

In the attribute table of my file geodatabase feature class I have a populated field called DateField of type date, and a text field called TextField. I have not yet hit on a way to convert the ...
0
votes
1answer
38 views

Adding formula in field calculator when new attribute is text type?

I added a new text attribute to my table. I would like it to print the values "y" or 'n", for when an attribute in the table is other a specific cut off it will code Y, and then that attribute is ...
5
votes
1answer
276 views

Calculating Percentiles in ArcMap?

I have a large polygon dataset (26,000) records with numerous attributes columns. I wish to calculate the percentile rank of each attribute. Say I have population_density in an attribute, is there a ...
0
votes
1answer
197 views

Concatenate Multiple String Fields and Convert to Date field using ArcGIS Field Calculator?

I'm Working in Model builder using the calculate value tool. I have three columns - SignatureDay, SignatureMonth, SignatureYear - All three are string data types and all consist of just numbers for ...
1
vote
2answers
42 views

QGIS upper round in field calculator

I need to to in the field calculator the following calc: toint(Field1 / 25.0) but i need to round the result to no decimal places but upwards. Exmaples: If 17/25 result should 1. If 25/25 result ...
1
vote
0answers
63 views

Assigning score to raster based on cell overlap with other raster and field value

I have a set of rasters that I've assigned scores to individually (scored based predominantly on values of other fields). The scoring scale is the same for all rasters, but the factors that determine ...
1
vote
3answers
72 views

VB Script field calculator - error with conditional statements

I have limited VB Script experience, but have been working on the script below and keep getting errors, the most common being "expected identifier". Can someone tell me what I'm missing here? Dim ...
2
votes
4answers
467 views

Auto populate field with text using field calculator if/then

I've extracted values from a raster to a point file, but now I need a field with the text information from the raster attribute table that corresponds with the value. I've been trying to use the field ...
0
votes
1answer
72 views

How can I refer to two tables in ArcPy's CalculateField_management? [closed]

I tried to refer to the different table's fields just like I saw in How to Calculate Field in joined table using ArcPy? but it doesn't work. There are two tables in my example. I have created table ...
0
votes
2answers
91 views

What fields can the CalculateField_management expression parameter contain?

What fields can the CalculateField_management expression parameter contain? I mean the parameters can be the fields what are in the output table, or can they be a field of another table too? There ...
0
votes
0answers
23 views

How to use calculatefield_management with ArcPy and joined second table? [duplicate]

How can I use calculatefield_management with ArcPy if I have a joined second table? I want to go through the attached table's field and I want to get records where the certain fields is. How can I ...
2
votes
5answers
560 views

Field Calculator expression to replace string only if it occurs

I have two fields (STREET1 & AKA_STREET_TEST1). I'm having a problem creating a simple IF THEN Python statement in the Field Calculator box. I've been searching the threads for a similar ...
0
votes
2answers
110 views

Field calculator to copy numeric values from other fields

FieldA contains text: both numeric(123) and alpha-numeric(123a, 2-3, 3/2, '). FieldB is longstring. I want to use field calculator and codeblock on FieldB to bring from Field A only the numeric ...
1
vote
0answers
30 views

QGIS (2.0.1): Field calculator for length not working - values way too high

Same problem as another thread: Field Calculator returning incorrect length and area values Trying to calculate length of a line shapefile, and field calculator is returning values that are way too ...
0
votes
2answers
60 views

Large dataset, how to copy values between fields

I'm in this position: i have a feature class containing about 6 million entries. I made a summarize and and generated a new table. I joined the two tables and now I need to copy the values from the ...
1
vote
1answer
99 views

How to perform If Statement in Field Calculator of ArcGIS for Desktop? (Python or VB)

I've one field "MAXSPEED". I want a Field Calculation that will calculate an additional field ("noise"): If MAXSPEED > 40 then the term: (73.5 + Log ( 25 ) * ( [MAXSPEED] / 50)) should be used to ...
0
votes
0answers
23 views

How to use random number generator to select by attributes in ArcMap? [duplicate]

I am not familiar in using Python and random number generator. I was wondering how to select 250 rows/values from a column named "JUROL". Every value in that column is different and the column ...
0
votes
2answers
81 views

Editing tables in ArcGIS for Desktop with Python Parser of Field Calculator?

so I'm trying to edit a table so that the name column will not contain spaces. I just don't know how to write the Python script that should go with it. This is what I have for the Python script ...
1
vote
1answer
199 views

python expression convert field to string and format with leading zeroes

I would like to create an expression using the field calculator in ArcMap to be able to convert an Int field to a string and add leading zeroes. I am able to do it in a python window with an example ...
3
votes
2answers
193 views

Problem using field calculator to add numbers in new field with preceding zeros

I wish to add a field in an attribute table that should work as a georeferencing key. It needs to take into consideration values from a series of fields. The last field is a housenumber and it ...
1
vote
1answer
98 views

Use field calculator to reclassify values from three different fields to populate a new field AND determine overlap with different raster

I want to reclassify values of 3 different fields AND determine if one of those fields is located inside a different polygon to populate the values of my new field. Everything is raster. I created a ...
2
votes
2answers
159 views

Assign field values (double) based on values of other field (string) using field calculator

I want to assign numbers to a field, WScore (double), based on field values of Soils (string). They are in the same table of a raster. I'm not trying to add text to a double. What I want to do is ...
0
votes
1answer
148 views

Basic Python Reclass question in Field Calculator

I'm trying to reclass values in field calculator using Python. I want any value >= '5' to remain the same (return same value). Anything else to be = '0'. Yes, DIST_EDGE are numbers. I'm getting an ...
3
votes
1answer
278 views

Calculate average value for each row

The picture is an example, but the method would be the same at mine bigger dataset. So i have some parcels with each a ID value and some fields. such as field 1, field 2, field 3, fieldd 4,... with ...
2
votes
2answers
72 views

select parcels in polygons and add fiels depending on the polygons

I have a lot of feature classes (results of service area with different polygons (0 to 10/ 10 to 20/ 20 to 40 and 40 to 60) (figure 1) Also i have a shapefile with a lot of parcels (figure 2) ...
1
vote
2answers
131 views

Calculate Fields from 3 different fields using ArcGIS for Desktop?

I'm using a shapefile of different vegetation and land cover types and I want to generalize to a simpler classification (ie. I only need to differenciate between young and old forest and open land, ...
1
vote
1answer
92 views

Extracting data from Address field using ArcGIS for Desktop?

I am fairly new to using python in field calculator and could use some help. I want to populate SitusRdType with RD or AVE or LN or ST or DR depending on the road type. I also want to just have the ...
1
vote
1answer
56 views

How to use field calculator in QGIS to calculate new coordinates, and use that new columm to geolocate a layer's points

In a separate question, at How to shift a CRS by an observed offset, I asked about shifting a CRS to align the problems aligning data points with a satellite image obtained from OpenLayers. (They ...
2
votes
1answer
65 views

Add a certain number of days for a date field

I have one field for a permit decision date, and then I have another field for 180 days from that permit date. The permit date field has data entered, but the 180 day field I would like to calculate ...
-1
votes
1answer
96 views

Field calculator (using ATAN)

How do I input the arc tan in the field calculator given the values of the fields to get the desired answer, I compare the answer of the manually computed arc tan value and the Atan Spatial Analyst ...
2
votes
0answers
49 views

Passing Value for Dictionary Look Up in Field Calculator fails [closed]

I've a field calculator that I am trying to use that uses a csv file to look up appropriate value based on key that is passed provided to the function. As provided below, the only values calculated ...
1
vote
0answers
169 views

Field Calculator stopped working

The field calculator seems to have stopped working for one of my attribute tables (it works fine on others). No matter what I get it to express (I've tried simply 2*2, just as a test) it just produces ...
2
votes
1answer
93 views

Subtracting columns (that include null values) in ArcMap Field Calculator

I’m desperately trying to run a very simple command where I subtract one column with others. However the problem is that some rows have NULL values, therefore the result of subtracting is also NULL. ...