Quantcast
Channel: Forums - Python
Viewing all articles
Browse latest Browse all 2485

write float data into a table

$
0
0
Hi guys,

I seem to be having issues populating a field with the Get Cell Value tool. Hope you can help me out a bit. Cheers

Code:

import arcpy

inRas = r"RasterData"

inFC = r"PointShape"

rows = arcpy.UpdateCursor(inFC)

for row in rows:
    Location = str(row.POINT_X) + " " + str(row.POINT_Y)
    celVal = arcpy.GetCellValue_management(inRas, Location, "")
    fVal = float(celVal.getOutput(0)) 
    row.setValue(row.RasVal, int(fVal))
    rows.updateRow(row)

del row, rows


Viewing all articles
Browse latest Browse all 2485

Trending Articles