AnsweredAssumed Answered

GetCellValue error: invalid literal for float()

Question asked by ivandorte on Jan 16, 2016
Latest reply on Jan 19, 2016 by Dan_Patterson

I'm trying to Get Raster Cell Value iterating a row selection over a point feature class and passing the coordinates as a string like this "1590388,53 4881616,56". But i receive this error:


Traceback (most recent call last):

  File "C:\Users\ivn\Desktop\sir\", line 7, in <module>

    Val = float(CellVal.getOutput(0))

ValueError: invalid literal for float(): 3,5872333

This is the script:


import arcpy

rs = arcpy.GetParameterAsText(0) #Input Raster

X_Y = arcpy.GetParameterAsText(1) #Coordinates of point


CellVal = arcpy.GetCellValue_management(rs, X_Y, "1")

Val = float(CellVal.getOutput(0))