AnsweredAssumed Answered

Is it possible to convert a raster hosted on arcgis rest to a polygon feature dataset?

Question asked by vlantaca on Apr 12, 2019
Latest reply on Apr 12, 2019 by vlantaca

I have a raster layer hosted on some arcgis rest service, let's say it's


Is there a way to convert this to a polygon feature layer using arcpy?


I have tried the following:


import arcpy

inRaster = r""
inField = 'Value'
outType = 'POLYGON'
simplify = 'SIMPLIFY'
outPolygons = r"C:\test\output.shp"
arcpy.ConvertRasterToFeature_ra(inRaster, inField, outType, simplify, outPolygons)





import arcpy
from arcpy import env
from import *

url = r""
inRaster = Raster(url)
outPolygons = r"C:\test\output.shp"
field = "VALUE"
arcpy.RasterToPolygon_conversion(inRaster, outPolygons, "NO_SIMPLIFY", field)



I always get errors:


RuntimeError: ERROR 000732: Input Raster: Dataset does not exist or is not supported


I know it does exist, because it shows up fine when I try to view the map service in ArcMap