gp.Reclassify_sa (ERROR 010255: String remap must be used with a string field)

549
2
11-27-2013 01:11 AM
MatthewBarlow
New Contributor
I am receiving the following message when executing my python script:

ERROR 010255: String remap must be used with a string field.

My input raster is floating point and I would like to reclassify it in python using gp.Reclassify_sa. I build my remap up as a string, but this doesn't seem to work. How do I build and pass my remap for a floating point raster?

The relevant code extract is as follows:

remap1 = "0 1.25 100000"
remap2 = "1.25 10 200000"
full_remap = remap1 + ";" + remap2
gp.Reclassify_sa(in_raster, "VALUE", full_remap, out_raster, "NODATA")
Tags (2)
0 Kudos
2 Replies
FabianBlau
Occasional Contributor II
Maybe you have to use a remap-object:
http://help.arcgis.com/en/arcgisdesktop/10.0/help/index.html#//009z000000sr000000.htm
full_remap = RemapRange([[0, 1.25, 100000],[1.25, 10, 200000]])
0 Kudos
MatthewBarlow
New Contributor
Thanks but I am using arcgiscripting with gp.Reclassify_sa and the following appears to be valid for only arcpy? Please correct me if I am wrong... this is frustrating me to no end!

Thanks,
Matt

Maybe you have to use a remap-object:
http://help.arcgis.com/en/arcgisdesktop/10.0/help/index.html#//009z000000sr000000.htm
full_remap = RemapRange([[0, 1.25, 100000],[1.25, 10, 200000]])
0 Kudos