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)
and
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
is the raster floating point or integer?
The raster is floating point
have a look at the first usage tip in RasterToPolygon's help
Is there no way to do conversions in arcpy for floating point raster layers?