Hello,
I have several raster files in a folder. I would like to convert them to polygons. Is there a way to run a batch?
Thank you
Solved! Go to Solution.
Iterate Rasters (ModelBuilder)—ArcGIS Pro | Documentation
Raster to Polygon (Conversion)—ArcGIS Pro | Documentation
in a model in modelbuilder...
However, "several"? By the time you get the model running and tested, you could have probably done it manually several times over.
If this is a repetitive task then consider modelbuilder, but a python script would probably faster.
Iterate Rasters (ModelBuilder)—ArcGIS Pro | Documentation
Raster to Polygon (Conversion)—ArcGIS Pro | Documentation
in a model in modelbuilder...
However, "several"? By the time you get the model running and tested, you could have probably done it manually several times over.
If this is a repetitive task then consider modelbuilder, but a python script would probably faster.
Thank you Dan, this worked!
from arcpy import env
#Set environment settings
env.workspace = r"C:\Users\MD\Documents\Geos\RECLASS_FILES"
rasters = arcpy.ListRasters("*", "TIF")
for raster in rasters:
a= (str(raster))
b= (a[:-4])
outRaster = (r"C:\Users\MD\Documents\Geos\RASTER_TO_POLY\CAT10")
In_v= raster
arcpy.RasterToPolygon_conversion(In_v, outRaster + str(b) +".SHP", "NO_SIMPLIFY","VALUE")
Batch geoprocessing—ArcGIS Pro | Documentation
which is kindof like modelbuilder... but check the requirements to see if it suits your needs