I'm trying to turn a PNG that looks like this to a shapefile with polygons that keep the categories marked by the colors on the map.
I have several maps to process, so manually tracing the polygons is not a valid option.
I tried to do this with
arcpy.RasterToPolygon, from here :
import arcpy from arcpy import env env.workspace = "C:/data" arcpy.RasterToPolygon_conversion("zone", "c:/output/zones.shp", "NO_SIMPLIFY", "VALUE")
In this case "zone" is the input PNG, this layer is already georeferenced to its actual location. zones.shp is the filename where I want to store the new features.
I get the following error:
Runtime error Traceback (most recent call last): File "<string>", line 5, in <module> File "c:\program files (x86)\arcgis\desktop10.4\arcpy\arcpy\conversion.py", line 337, in RasterToPolygon raise e ExecuteError: ERROR 010151: No features found in c:\gis\output\control_test.shp. Possible empty feature class. Failed to execute (RasterToPolygon).
Is it possible to fix this error or to use another function to get to my goal?
I have the original PNG as an SVG with vector drawn polygons if that helps.