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

point to raster, i got the error..

$
0
0
Code:

###########Point to Raster
# Import arcpy module
import arcpy, os
from arcpy import env
from arcpy.sa import *



# Set environment settings
arcpy.env.workspace = "C:/py2/extract"
arcpy.env.overwriteOutput = True

OutputFolder2 = "C:/py2/result"

# Loop through a list of files in the workspace
RasterFiles2 = arcpy.ListFeatureClasses()

print "POINT TO RASTER"
print RasterFiles2
print " "



# Set local variables
for filename2 in RasterFiles2:
    print "Processing: {0}".format(filename2)
    outRaster2 = os.path.join(OutputFolder2, filename2)
    value = "RasterValu"
    assignmentType = "MOST_FREQUENT"
    priorityField = "NONE"
    cellSize = "0.035714286"
# Execute ExtractValuesToPoints
    saveRaster = arcpy.PointToRaster_conversion( filename2, value, outRaster2, assignmentType, priorityField, cellSize)

print " "
print ":o) End Processing :)"
print arcpy.GetMessages()


my point shp file, attribute table.
..Attachment 24481






i got this error

Code:

Traceback (most recent call last):
  File "C:\Users\Administrator\Desktop\arcpy\convert", line 33, in <module>
    saveRaster = arcpy.PointToRaster_conversion( filename2, value, outRaster2, assignmentType, priorityField, cellSize)
  File "C:\Program Files\ArcGIS\Desktop10.0\arcpy\arcpy\conversion.py", line 1772, in PointToRaster
    raise e
ExecuteError: Failed to execute. Parameters are not valid.
ERROR 000728: Field RasterValu  does not exist within table
ERROR 000840: The value is not a Raster Dataset.
ERROR 000840: The value is not a Raster Catalog.
Failed to execute (PointToRaster).

Attached Thumbnails
Click image for larger version

Name:	20130516_161847.jpg‎
Views:	N/A
Size:	158.3 KB
ID:	24481  

Viewing all articles
Browse latest Browse all 2485

Trending Articles