Skip to main content

All Questions

Tagged with
Filter by
Sorted by
Tagged with
0 votes
1 answer
71 views

I am new to python and was trying to populate a decade field based on an if else statement on another field that contains parcel years. The code block is below: def ifBlock(Parcel_Year_Built, ...
Androoo's user avatar
-2 votes
1 answer
921 views

I am attempting to calculate a text field in my attribute table based on a number code given in a different column For example, any number under the "LU_1" column that is '510' will be ...
Olivia W's user avatar
0 votes
2 answers
580 views

I am trying to use Python in ArcGIS Pro to cleanse some data via imported Excel sheets. The expression works, but the Code Block if-else statement to return nothing if !Street_Id! is returns an error....
cheff_'s user avatar
  • 139
2 votes
1 answer
3k views

I have two columns in my shape file with text values called GP and Z which contain abbreviations and a third column called UpOrDown which is meant to hold the binary 0-1 generated from the if-then ...
Therow's user avatar
  • 161
1 vote
1 answer
753 views

Using ArcGIS 10.4. I'm trying to reclassify values from a field (ECOREGION_DIVISION), which is in string format, into new values using the following Python syntax: def Reclass(ECOREGION_DIVISION): ...
kent 's user avatar
  • 101
-1 votes
1 answer
58 views

I just started a new job and in one of the procedures I was given for one of my tasks I found this piece of code. It just adds a comment to a field that's already filled up. For instance, field1 might ...
user1503110's user avatar
1 vote
2 answers
360 views

Just wondering if there's an easy way to fill null values in one column in an attribute table with values in another column of the same attribute table by just writing a query "just the "null values" ...
Bob's user avatar
  • 11
1 vote
0 answers
212 views

I am trying to calculate a roadway pedestrian restriction based on its functional class, using if/else logic in Python. Every time I enter this, it only turns up 'No'. The categories are strings, and ...
Emmett McKinney's user avatar
1 vote
0 answers
232 views

I have created a model in ArcGIS 10.2 that iterates through some feature classes in order to add a field 'Zmin10' (double) and calculate the field value based on a variable (called "Minimum") to which ...
Serena's user avatar
  • 13
2 votes
3 answers
3k views

I would like to calculate the slope value in %, but I don’t want to have any negative values. If there are negative values in the slope field, I would like to multiple them by -1 and if not, multiple ...
Anahita Kp's user avatar
2 votes
1 answer
394 views

I want to calculate a field depending on 3 input string parameters. Two of them can contain Null-values. My old VB expression was not able to work with Null-values, so the script stopped. Now I want ...
Steve-O's user avatar
  • 23
2 votes
1 answer
7k views

I've been using ArcGIS Pro over ArcMap recently because ArcMap is giving me some incorrect summary statistics that I use to populate a data field in a number of feature classes. The problem is that I'...
Carlos_S's user avatar
1 vote
1 answer
4k views

I have a field (WS_Type in the screenshot) that I want to use to calculate values based on the text within the field. The number of occurrences of each WS_Type in the field is not important, but the ...
nso921's user avatar
  • 63
1 vote
4 answers
1k views

ArcMap 10.4.1 on Windows 7. I am trying to fill in some blank rows in a column using field calculator. The field I am trying to fill is: label. If it is empty I want it to be populated with a value ...
sparky's user avatar
  • 450
1 vote
2 answers
913 views

I am unsure what syntax issue I am having with my If/Elif statement. I want to not use a column in my calculation if the value is blank. The end goal is to not have extra spaces before, after and ...
Randy Wolter's user avatar
6 votes
1 answer
5k views

I am a novice in Python as well has having minimal experience with ArcMap. Currently I am using a U.S. Census TIGER file, mapping roads in Harris County, TX. I want to add a new field called SPEED, ...
DPek's user avatar
  • 205
0 votes
1 answer
134 views

I want to take all positive values in a field and multiply them by -1000. To do this, I put together the following code block: def myCalc(x): if (x > 0): x*(-1000) return x else: ...
Stella's user avatar
  • 1,318
1 vote
1 answer
277 views

I have a FC with a column for NEAR_ANGLE from the output of the NEAR tool. The angle is displayed in degrees (i.e. -154.67687) which is fine. I am trying to create a column, HEADING, that reads this ...
Carl Ross's user avatar
1 vote
1 answer
798 views

I am working on a street addressing project. I want to add a number to every odd number. Example if [field] is odd [field]+=1. How can I do this in ArcMap using the field calculator. I used to work ...
Kazablanka's user avatar
-1 votes
2 answers
3k views

I am trying to populate a field [Hazard] based on the values in two other fields [Depth2D] and [Speed2D]. I have managed to write a code block in VB script that works but I really want to figure out ...
ALiOAWA's user avatar
  • 13
1 vote
1 answer
183 views

I'm trying to use an if statement in the field calculator: This is what the code looks like in Python: a= 2 FacilityID= !FACILITYID! if a%2==0: MH_ID_Calc=FacilityID[0:6] else: MH_ID_Calc=...
LEECCC's user avatar
  • 11
1 vote
0 answers
148 views

I have a shapefile and want to calculate a field based on another field. The two fields are "DURATION" and "STATUS". I need "STATUS" to display three different outputs based on "DURATION". I want "...
user88607's user avatar
8 votes
2 answers
1k views

I have an existing Excel spreadsheet developed to track specific fire hydrant data, this is periodically updated and joined to the spatial hydrant data in ArcGIS. In the spreadsheet there is a number ...
LandArch's user avatar
  • 2,211
6 votes
1 answer
990 views

I have a datetime field (Horario) in my feature class, showing only the time. Although the date doesn't appear, it seem to be stored automatically as 30 Dec 1899, I'm not sure why. I want to use ...
Beatriz Viseu's user avatar
6 votes
1 answer
41k views

I have gotten stuck on seemingly simple ArcGIS field calculator python expression. I obtained a great answer to a another similar question a few years ago: Using Range in Python expression of ArcGIS ...
sirgeo's user avatar
  • 2,057