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

How to load image to Raster attribute field with python

$
0
0
I'm working with ArcGis 10.0 and I try to load dinamically images to Raster attribute field using python, anyone knows any method to load an image in this field.

This is my code

Code:

arcpy.env.workspace = r'D:\LABSIG\CAU\trabajos_diarios\Pruebas Raster\mbd_proyecto_arbolado.mdb'

entityDataset = arcpy.ListDatasets("arbolado")
featureClass = arcpy.ListFeatureClasses("Arbol_censo", "", entityDataset[0])
image = r'D:/Proyecto Arbolado/C12/C12_657.JPG'
cursor = arcpy.UpdateCursor(featureClass[0])
for row in cursor:
        row.setValue("raster_field", image)       
        cursor.updateRow(row)

When I try to do this, nothing happened. Should exist an special method or function to load an image in a Raster field?
Please help me to find a solution. Thanks

Viewing all articles
Browse latest Browse all 2485

Trending Articles