AnsweredAssumed Answered

Unable to open feature class Failed to execute (RasterToPolygon)

Question asked by warlubartdu on Aug 11, 2014
Latest reply on Aug 12, 2014 by xander_bakker

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
  import arcpy
  from import *
  from arcpy import env
  env.overwriteOutput = True

  #set the workspace
  arcpy.env.workspace = r"C:\Users\Windows\Documents\JO_GIS_Analyst"

  #Get a list of rasters and convert to shapefile
  for raster in arcpy.ListRasters("nofpt*", "TIF"):
  print raster #check the presence of rasters"
  #convert the raster to polygon
  arcpy.RasterToPolygon_conversion(raster, raster +".shp", "SIMPLIFY")
  print "Finish converting the rasters to polygon"