I'm trying yo execute the RastertoPolygon conversion tool in ArcGIs 10.1. I'm executing it through a for loop, then it resulted to an error (Unable to open feature class Failed to execute (RasterToPolygon)) at the python console. As I checked for some output, the first raster from the list is successfully converted to shp file while the rest are not. Any suggestions? Note: (All of my rasters are already in integer data type)
#import the module<BR /> import arcpy<BR /> from arcpy.sa import *<BR /> from arcpy import env<BR /> arcpy.CheckOutExtension("Spatial")<BR /> env.overwriteOutput = True<BR /><BR /> #set the workspace<BR /> arcpy.env.workspace = r"C:\Users\Windows\Documents\JO_GIS_Analyst"<BR /><BR /> #Get a list of rasters and convert to shapefile<BR /> for raster in arcpy.ListRasters("nofpt*", "TIF"):<BR /> print raster #check the presence of rasters"<BR /> #convert the raster to polygon<BR /> arcpy.RasterToPolygon_conversion(raster, raster +".shp", "SIMPLIFY")<BR /> print "Finish converting the rasters to polygon"