I have a raster layer hosted on some arcgis rest service, let's say it's https://domain.com/arcgis/rest/services/rasters/Heatmap/MapServer/0
Is there a way to convert this to a polygon feature layer using arcpy?
I have tried the following:
import arcpy inRaster = r"https://domain.com/arcgis/rest/services/rasters/Heatmap/MapServer" 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 arcpy.sa import * url = r"https://domain.com/arcgis/rest/services/rasters/Heatmap/MapServer/0" 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 https://domain.com/arcgis/rest/services/rasters/Heatmap/MapServer/0 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