Jan-23-2018, 11:03 AM
Hey everybody!
I am starting to learn python by myself, specifically to use it in ArcGIS. I am creating right now a code to integrate it into a script. The tools i want to run within are: IDW (interpolation) and reclassification (Spatial analyst). The thing is that I would like to create a model without setting up the exactly values for a shp. since the beginning in case another person wants to work with in and implement any input related to what it is being calculating.
Unfortunately a message prompts up whenever I want to run the code saying "invalid syntax" and I am not able to see what's wrong.
Thanks for helping me out!
This is the entirely code:
I am starting to learn python by myself, specifically to use it in ArcGIS. I am creating right now a code to integrate it into a script. The tools i want to run within are: IDW (interpolation) and reclassification (Spatial analyst). The thing is that I would like to create a model without setting up the exactly values for a shp. since the beginning in case another person wants to work with in and implement any input related to what it is being calculating.
Unfortunately a message prompts up whenever I want to run the code saying "invalid syntax" and I am not able to see what's wrong.
Thanks for helping me out!
This is the entirely code:
import arcpy from arcpy import env from arcpy.sa import* env.workspace("D:/Descargas/python/Lesson1") try: inPointFeatures="" power="" searchRadius="" outIDW=Idw(inPointFeatures,power,searchRadius) outIDW.save"" recl_value="VALUE" recl_data="DATA" outRecl=arcpy.sa.Reclassify(recl_rule,recl_value,recl_data) outRecl.save" " outPath=arcpy.GetParameterAsText(1) arcpy.AddMessage("All done!") except: arcpy.AddError("Something has failed") arcpy.AddMessage(arcpy.GetMessages(arcpy.AddMessage,arcpy.AddError))