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
1answer
22 views

new layer from calculations with fields of other layers in QGIS

I've two layers, both with the same fields: A, V, where A is the shape's area and V a value given by me. I want a new layer with shape created by the intersection of the other layers' shapes and a ...
2
votes
1answer
21 views

Create field on open ArcGIS map - not saved

I am using ArcGIS desktop with an SDE feature layer with enterprise data that I do not have rights to edit. The data changes weekly but I need a field that is sum of 2 current fields without creating ...
0
votes
1answer
25 views

if/then with VBScript in ArcGIS Field Calculator giving Error 000539: SyntaxError: invalid syntax?

What is wrong with this VBscript in the field calculator? ColumnC= if [ColumnB] > 0 then [ColumnC] = [ColumnA] / [ColumnB] endif Each time I receive this syntax error message: Error ...
1
vote
0answers
29 views

ArcGIS Calculate Fields gives Warning 000405 No records within table?

Situation: I have feature layer sitting outside processing extent in Environment settings. If I open layer's table and use field calculator - Calculate Geometry on some numeric field: it works ...
2
votes
1answer
86 views

ArcGIS Python syntax error using nested if else

I am trying to use the field calculator in ArcMap 10.2 to fill an empty field based on the contents of two exiting fields usint this python script in the Pre-Logic Script Code. def ...
0
votes
0answers
52 views

Line length for line files

Using QGIS, Brighton 2.6. Trying to calculate line-lengths for linear features (roads, trails, fenceline) and used this post (How to find line length in QGIS while editing?) and the links associated ...
1
vote
2answers
117 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
62 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
55 views

Using ArcGIS field calculator?

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
43 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
92 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
33 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
25 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
208 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
24 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
189 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
20 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
31 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
116 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
19 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
70 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
31 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
56 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
69 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
25 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 ...
2
votes
1answer
53 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
67 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
19 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
35 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
40 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
58 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
47 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
38 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
22 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
158 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
46 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
20 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
41 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
64 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
59 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
61 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
172 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
49 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
96 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
62 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
109 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
62 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
105 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
71 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 ...