Quantcast
Channel: Forums - ArcGIS for Desktop - General
Viewing all articles
Browse latest Browse all 2328

Using python for reclassing numbers i field calculator. Help!!

$
0
0
Hi , I am trying to write litte phyton script in field calculator, but I cant't get it to work.

I want to reclass a field from numbers to other numbers.
I have looked around in the help and on forums and copied and paste but still doesn't get it to work. Please can someone help me! This drives me crazy!


The field Buffer hold numbers between 5011 and 5091.
I want all 5011 to become 15, 5022 and 5025 to become 7 and the rest 3.
How hard can it be!?

I tried to use this script (and a variation of this):

def Reclass(BufferBredd):
if (BufferBredd = 5022):
return 7
elif (BufferBredd = 5025):
return 7
elif (BufferBredd = 5011):
return 15
else
return 3

in the box further down
Buffer=

Reclass(!Buffer!)


I tried to follow whats on tis site.

http://help.arcgis.com/en/arcgisdesk...0000002m000000

I use ArcGIS 10.0

Thanks!

Viewing all articles
Browse latest Browse all 2328

Trending Articles