I"m trying to create a tool that reclasses values and stores them in a new field in a table but I'm not sure how to do it. I tried using the create_field_management and calculate_field_management tools but they don't add up.
My goal is to have the user input a shapefile, then the user specifies that they want to reclassify the field called 'infield', which is a double, and then store the results in a field that doesn't exist yet, and is named by the user.
I have a table that shows you how to do the reclassification, with values lowerbound, uppderbound, and value. For every row in the table of the input shapefile the code has to look at the value of 'infield' and decide what to write in the user specified output. To do this, it must go through the reclasstable to find the first row in reclasstable where the value from infield is greater than or equal to the lowerbound and less-than-or-equal-to the upperbound.
If this row exists, then outfield should be set to value.
If no row in the reclasstable matches the current value in infield, then outfield should be set to a special number called notfoundvalue, which the user has also specified.
I am completely stumped on this. Could anyone give me any help?
My goal is to have the user input a shapefile, then the user specifies that they want to reclassify the field called 'infield', which is a double, and then store the results in a field that doesn't exist yet, and is named by the user.
I have a table that shows you how to do the reclassification, with values lowerbound, uppderbound, and value. For every row in the table of the input shapefile the code has to look at the value of 'infield' and decide what to write in the user specified output. To do this, it must go through the reclasstable to find the first row in reclasstable where the value from infield is greater than or equal to the lowerbound and less-than-or-equal-to the upperbound.
If this row exists, then outfield should be set to value.
If no row in the reclasstable matches the current value in infield, then outfield should be set to a special number called notfoundvalue, which the user has also specified.
I am completely stumped on this. Could anyone give me any help?