Skip to main content
16 events
when toggle format what by license comment
Apr 10, 2022 at 12:00 history tweeted twitter.com/StackGIS/status/1513124641644158981
Apr 5, 2022 at 7:24 history protected CommunityBot
Apr 5, 2022 at 3:42 comment added faisal arsad with fieldcalculator "phyton" and show codeblock maximum = max(row[0] for row in arcpy.da.SearchCursor(fc, ['X'])) with arcpy.da.UpdateCursor(fc, ['X','Y']) as cursor: for row in cursor: row[1] = row[0] / maximum cursor.updateRow(row) notif geoprocessing result : "NameEror : name 'Y' is not defined PLEASE HELP THANKS
Feb 22, 2017 at 16:07 comment added user I am a beginner in python. For calculating maximum value from numeric field I need use this part of code: maximum = max(row[0] for row in arcpy.da.SearchCursor(fc, ['X'])) But after insertion into the field calculator an error message appears. In field calculator I chose python parser. Any solution? Thank you
Feb 9, 2015 at 22:56 answer added Jelle timeline score: 3
Aug 10, 2014 at 22:26 vote accept GeoLuCa
Aug 9, 2014 at 21:34 answer added Aaron timeline score: 4
Apr 4, 2014 at 7:57 answer added Alešinar timeline score: 0
Apr 4, 2014 at 7:20 history edited PolyGeo
edited tags
Mar 31, 2014 at 10:19 history edited PolyGeo CC BY-SA 3.0
Turned title into question; edited tags
Mar 24, 2014 at 16:23 history migrated from stackoverflow.com (revisions)
Feb 7, 2014 at 13:25 comment added GeosDK Eventually I resorted to looking for the max value by ascending the values in field X and using that value to the denominator in the field calculator. However, I would still like to find out whether it would be possible for the field calculator to populate a field automatically by searching the cursor for the max value (I know this is possible when looking for max values in multiple fields, but can't find the same for a single field)
Feb 7, 2014 at 13:24 comment added GeosDK If I use VB Script it throws an error saying "There was a failure during processing, check the Geoprocessing Results window for details" (i.e. Error 999999 Error exectuing function). I've tried adding commas - different sorts -, checking spaces etc. Nothing works.
Feb 7, 2014 at 13:19 comment added GeosDK If I use the code above with Python script Y=!X!/max(!X!) it gives me 1 as the result for all the fields as it replaces !X! with the numerical value for each respective row (basically dividing with itself rather than using the max value in field X as the denominator.
Feb 7, 2014 at 9:40 comment added Ansgar Wiechers Please show your code and explain what isn't working as you expected. Do you get an error? If so, what is it?
Feb 6, 2014 at 23:00 history asked GeoLuCa CC BY-SA 3.0