AnsweredAssumed Answered

arcpy.conversion.RasterToPoint errors

Question asked by jfritz on Oct 4, 2018
Latest reply on Oct 4, 2018 by jfritz

Having difficulty with the following script.  A couple of variables to know about are not shown but have been run prior to this snippet, they are:

outrasterpath = r"S:/General-Offices-GO-Trans/SLR-Mapping/GIS_Projects_2018/Smart_T_Line_Model/geodata/TEST_RASTERCLIP.gdb/"

 

outrastertopoint = r"S:/General-Offices-GO-Trans/SLR-Mapping/GIS_Projects_2018/Smart_T_Line_Model/geodata/TEST_RASTERTOPOINT.gdb/"

 

arcpy.env.workspace = outrasterpath
rasterList = arcpy.ListRasters("*", "GRID")
for raster in rasterList:
    arcpy.conversion.RasterToPoint(raster, outrastertopoint + raster, "Pixel Value")
Traceback (most recent call last):
  File "<string>", line 2, in <module>
  File "c:\program files\arcgis\pro\Resources\arcpy\arcpy\conversion.py", line 195, in RasterToPoint
    raise e
  File "c:\program files\arcgis\pro\Resources\arcpy\arcpy\conversion.py", line 192, in RasterToPoint
    retval = convertArcObjectToPythonObject(gp.RasterToPoint_conversion(*gp_fixargs((in_raster, out_point_features, raster_field), True)))
  File "c:\program files\arcgis\pro\Resources\arcpy\arcpy\geoprocessing\_base.py", line 496, in <lambda>
    return lambda *args: val(*gp_fixargs(args, True))
arcgisscripting.ExecuteError: Failed to execute. Parameters are not valid.
ERROR 000860: Input raster: is not the type of Composite Geodataset, or does not exist.
ERROR 001000: Field: Field Pixel Value does not exist
Failed to execute (RasterToPoint).

 

A few other bits of info.  I have tried "VALUE", "Pixel value", and "Stretch.Pixel Value" for the last argument, none work.

Have left the () with no inputs on Line 2 with no luck.

 

Thanks for any help!

Outcomes