I have a polygon feature and i want to convert it to a raster but i dont want the polygon as a whole , i just want each column to produce a different raster.The first problem starts that the values are float. I have tried to write a python to do this but I am still getting errors, below is my table and I would like to have a raster for the S10 and S100 respectively.
the code is as follows:
import arcpy
import os, sys
import numpy as np
outputfolder = arcpy.GetParameterAsText(0)
featuredata = arcpy.GetParameterAsText(1)
createdRaster = arcpy.GetParameterAsText(2)
#cursor = arcpy.da.SearchCursor(fc,['S10','S100'])
rows = arcpy.da.SearchCursor(featuredata,['S10','S100'])
#for i in range(2,7,2):
#arcpy.AddMessage("When i is {0}".format(i))
#rows.reset()
for row in rows:
if row[1]:
#fid = row.getValue('FID')
query = str(row[1])
arcpy.Select_analysis(featuredata,"in_memory")
arcpy.FeatureToRaster_conversion("in_memory",row[1],createdRaster,10)
arcpy.Delete_management("in_memory")
And the error that I get :
Traceback (most recent call last):
File "C:\Python27\featureToraster.py", line 21, in <module>
arcpy.FeatureToRaster_conversion("in_memory",row[1],createdRaster,10)
raise e
ExecuteError: Failed to execute. Parameters are not valid.
ERROR 001000: Field: Field 0.405 does not exist