After having converted my xyz-file to a point feature class, I am trying to convert to a grid using a Python snippet. The data represents river bathymetry. However, when executing the script, I get: 'ERROR 999999: Error executing function'.
There must be something wrong with my input data, or with the arguments in the python snippet. I already changed double quotes into singles (worked for me with a previous problem), and before converting my .pts-input file to a point feature class, I checked for any odd lines that might contain string - in this file there are none.
This is my code (the converting-to-point-feature-class section does work):
The variable fn is simply the input file name defined earlier on in the script. RDnew is a coordinate system that was also defined earlier on in the script.
print 'Converting to point feature class.' pts_shp = fn[0:8] + '.shp' #output file name (using fn[0:8] to get rid of the .pts or .txt extension) arcpy.ASCII3DToFeatureClass_3d(fn,'XYZ','.\\shp_points\\' + pts_shp,'POINT','1',RDnew,'#','#','DECIMAL_POINT') print 'Converting to grid.' output_grid = 'grid_' + fn[3:8] arcpy.PointToRaster_conversion('.\\shp_points\\' + pts_shp,'Shape.Z','.\\grids\\' + output_grid,'MOST_FREQUENT','NONE','1')
Error 999999 does not really get me anywhere. Do you have any suggestions on what might be wrong with my input / code?