1
vote
2answers
58 views

Call field from zip() into Field Calculator expression ArcGIS

I've been trying to find a way to call in field names from a zip(). Basically I have 12 fields called "Flw_days1", "Flw_days2" etc and corresponding "Depth" fields that need to be calculated using the ...
0
votes
2answers
41 views

If clause within if clause VBA Arcgis10

I'm using ArcGIS10. I do not know what's wrong with this VBA code in the Field Calculator: *All the fields are String type If [StartY] < [EndY] Then If [DOT_OSM] ="1" Then Output = "F" ...
2
votes
1answer
96 views

How to get the First and Last Point coordinates of a Polyline with Field Calculator in ArcGIS10

I'm trying to get the First Point coordinates (x,y) and Final Point coordinates (x2,y2) from a polyline in ArcGIS 10 with the Field calculator. I've added 4 (double) fields like StartX,StartY,EndX ...
0
votes
1answer
65 views

Using Field Calculator to Add a Set Amount of Time to Date Field

I wish to georeference several photos to a track created using a Garmin Oregon 450t, but the time recorded in the photos and the time recorded in the .GPX are not the same. The format for the date ...
0
votes
1answer
64 views

How to use “this” Levenshtein Python code into ArcGIS 10

I need some help with this: First of all, I wanted to "Compare strings from two fields", and asking before at gis.stackexchange, in this post someone help me with this topic, referring me to a Python ...
2
votes
1answer
157 views

How to compare string fields in the same table with ArcGIS 10

I don't know exactly if there is a tool for this or a maybe a python script could be more suitable. I want to compare string elements from a field (POI_NAME) with another string element in another ...
1
vote
1answer
62 views

Python in ArcGIS, CalculateField_management, updating with single value

I have a float field which I want to simply update all values with 1. I can easily do this within the field calculator but I have started using python today, what is the syntax to simply update a ...
1
vote
1answer
24 views

Does ArcGIS Desktop have conditional function useable in field calculations?

Does ArcGIS / ArcView 10 have a conditional function, e.g. ifx(test,if_T,if_F), that could be in-lined in field calculations?
2
votes
1answer
54 views

How can I change all the entries in a field to be entirely lower case?

I have a field with a bunch of species names, but for a single species there a bunch of case combinations (e.g. Cat, CAT,cat). I want to make a new field which has all the entries in all lower case. I ...
0
votes
2answers
153 views

Model Builder Error populating attributes with Calculate Field

I would like to run a model that iterates over all feature classes in a feature dataset and uses the feature class name to populate an attribute field (see model below). However, when running the ...
4
votes
3answers
295 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 ...
1
vote
1answer
94 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: ...
3
votes
2answers
340 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) ...
1
vote
2answers
120 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
1answer
217 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 ...
5
votes
2answers
180 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 ...
0
votes
1answer
134 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 ...
1
vote
1answer
143 views

Comparing field values to update new field using ArcGIS for Desktop?

I am currently doing an analysis in ArcMap 10 using python. I have two shape layers, one is a point layer and the other one is a line layer. The point layer have attributes for point's unique ID, as ...
1
vote
1answer
778 views

ArcGis File Geodatabase with Null values (Field Calculator)

I want to use the field calculator to get the sum of a couple of columns. The problem is that some of them has Null Values. I am not able to find a solution. I tried this Python functions: stack( ...
2
votes
2answers
223 views

Can anyone tell me why my field calculator is returning this error?

All I am trying to do is pull into a text field, a section of another text field via: fieldB = !fieldA![some_index:other_index] However I keep receiving the error below and I can't figure out why. ...
0
votes
2answers
111 views

Stacking attributes in a text field

I am trying to stack my text in an attribute table using the field calculator, but it does not seem to be working. My field name is: Facilities. My attributes are in this format: Public ...
2
votes
2answers
403 views

Field calculator or update cursor?

I have a feature class in which one field (let's call it "Field_A"), as yet empty, is to be populated by the contents of another field ("Field_B") multiplied by a certain number (I'll call it the ...
1
vote
2answers
111 views

How to get a string from a Double with a fixed number of decimals?

I have a featureclass (in a File Geodatabase), with a particular field of type Double. I want to copy it over to a text field, so that only 3 decimal places are shown. For example: 34.78902345 ...
0
votes
0answers
55 views

Replace Null Values Field Calculator [duplicate]

I am using ArcGIS 10 and have a polygon shapefile in which many of the numeric fields are Null. The polygon shapefile in question is produced by joining a polygon shapefile with a point shapefile and ...
2
votes
1answer
347 views

Am I over-complicating adding and then calculating fields? Suggestions for a better way? (Python)

I'm attempting to re-position a question I asked yesterday here. I am starting to think that the way I wrote my code just isn't the best way. Am I overcomplicating things? I know for a fact that ...
2
votes
1answer
736 views

Incorrect field name resulted in RuntimeError: ERROR 999999 (Also, better code for adding and calculating fields)

This is the bottom half of my code (and it's been edited somewhat to share publicly). The code works perfectly fine when the fieldList has only three fields in it, but when I populate it with all 108 ...
0
votes
0answers
26 views

I need to add one table to another table as strings.

But all of this two table data is numeric. And one of them is float. So I need to add from the float table only integer and merge it with other table. What to write in field calculator?
2
votes
1answer
837 views

Using the Field Calculator in a Domain field

I have a coded domain field with 10 dropdown options. Possible choices include integers and text. I need to change a selection of 250 features (which have differing values) to the same value. This ...
1
vote
1answer
798 views

Delete first two letters from a string field

I'm looking for a field calculator python statement to delete only the first two letters of string entries. For Ex: !Name!.strip([0:2]) I know this syntax is incorrect. Thanks a lot
0
votes
3answers
334 views

How can I easily detect gaps in a polyline using arcmap 10.0 (arcview license)?

I'm making routes by selecting links from a streets layer which I export as a new temporarely layer in arcmap 10. This layer which I call route_temp unfortunately can be very long and contain gaps, ...
-1
votes
1answer
223 views

Field Calculator Does not Work in Arc10

I'm having a problem, described below, with Field Calculator in ArcGIS 10. I wonder if there is a known fix at this point. I'm updating to 10.1 soon, but this work cannot wait until then. Details: ...
2
votes
1answer
555 views

Using Python in the Field Calculator, how do I refer to a field in another shapefile?

I want to compare the changes in geometry between two shapefiles (of election districts in NYC. One is from 2001 and the other 2005). I am attempting to calculate a new field in the 2005 shapefile ...
4
votes
3answers
629 views

How to insert a quotation mark through the Field Calculator of attribute table of a Shapefile?

I have a shapefile of polylines with information of diameter. But the problem is that i didn't enter the inch sign(") with the values of diameter. What would be the solution that qutation mark would ...
7
votes
7answers
6k views

How to Remove return/newline (\n) character from Field using Python and Field Calculator?

I have a geodatabase table with a field that I'm trying to remove return characters (new line). I found this post (How can I remove (chomp) a newline in Python?) of how to do it, however it is not ...
1
vote
1answer
139 views

How do you calculate values of a field based on two others using Field Calculator in ArcGIS 10.0?

I need to combine two fields in an attribute table. I want to do this using the field calculator. What is the proper script to write to combine a field called "name" and "type", so that it produces ...
4
votes
1answer
608 views

Why can't I multiply two string fields in the Field Calculator by converting them to int() and float()

I'm using ArcGIS 10 and new at python scripting. I have a string field that I need to calculate by multiplying two other string fields. I can do it in python using two arbitrary values... CINPT1 = ...
2
votes
1answer
586 views

Counting occurrences across a record in ArcGIS 10.0

I'm a student at Millersville University, PA studying for a BA in Geography with a concentration in GIS. I've stumbled across this site for questions I've had over the past year or so with getting ...
1
vote
1answer
431 views

How to calculate field as cursor name?

First time dealing with cursor. I have lines intersecting polygons, I want to get a table with all attributes of the lines, add a field and calculate the field as the name of the polygon. I was able ...
7
votes
3answers
2k views

Calculating Field based on name of shapefile

I have multiple shapefiles to which I have added a field called "gname1". For each shapefile, I want "gname1" to be set to the name of that particular shapefile, for every feature within the ...
3
votes
2answers
398 views

Python find string with two decimal characters

I have two columns in a personal geodatabase table that I'm trying to add up (to a third field) using a python function in field calculator, however some of the string values are not real numbers. ...
2
votes
1answer
405 views

Field Calculator Runs In IDLE (2.6.5) but not ArcGIS 10 SP3

just wondering if anyone else is having issues with the field calculator in ArcGIS 10 SP3. In the following code I do a pretty simple field calculation with a variable (an array) as one of the ...
2
votes
1answer
428 views

Field Calculator operation is not working

I've done this 100s of times and I can't understand why it won't work! I'm trying to copy the first 8 digits of from a HUC 12 (Hydrologic Unit Code) to a new field, which represents a larger ...
0
votes
2answers
1k views

Replacing NULL values in geodatabase table?

How do you update NULL values within a geodatabase table using the ArcGIS Field Calculator (service pack 4) without changing other values to NULL? I've tried the suggestions on this previous ...
15
votes
6answers
4k views

ArcMap 10.0 Python Field Calculator, Find/Replace Double Quotes

I'm trying to use the Field Calculator (ArcMap (10)) to strip out double quotes in an address field (I didn't put them in there, believe me). I've tried many incantations but am still unable to even ...
10
votes
2answers
907 views

How to compute a new attribute based on changes in another attribute?

I am attempting to classify a set of gps time-encoded point data into behaviors based on different attributes. I have created an attribute that is 0 for home and 1 for away based on location, and now ...
2
votes
2answers
2k views

Multiple input tables for Add Field in ModelBuilder

My model requires field1 to be added to fc1 and fc2, and then calculated according to a Python expression calc1. field2 is then added to fc2, and calculated using calc1. How do I add the multiple ...
3
votes
2answers
740 views

Why is ICalculator.Calculate significantly slower than the CalculateField geoprocessing tool with SDE datasets?

I just discovered today that there are essentially two ways to calculate field values in ArcObjects: 1. Using ESRI.ArcGIS.GeodatabaseUI.ICalculator: ITable table = …; ICursor updateCursor = ...
3
votes
2answers
2k views

Use output of Add Field as input for Calculate Field in ModelBuilder

I have created a simple model in ArcGIS 10 which, after some initial processing of a feature class, outputs outputfc and adds a field to it. Regardless of the feature class input (which the user ...
2
votes
2answers
479 views

Looking for python/VB script to insert a new uniqe field

Is there any phyton/VB script which will add a field to shapefile which will be corresponding to first three characters from the shapefile name ? I am working in modelbuilder and arcgis 10. Thanks ...
2
votes
1answer
193 views

Why isn't this Python calculation working correctly?

I want to label the source files for a unified shapefile, and there are three respective columns for each. If there is no value in the column, there is no data from that source; if there is a value in ...