# -*- coding: utf-8 -*- # --------------------------------------------------------------------------- # SplineExampleScript.py # Created on: 2012-03-01 14:43:43.00000 # (generated by ArcGIS/ModelBuilder) # Usage: SplineExampleScript <selection0> <Z_value_field> <Spline_sele37> # Description: # --------------------------------------------------------------------------- # Import arcpy module import arcpy, os # Check out any necessary licenses arcpy.CheckOutExtension("spatial") # Script arguments selection0 = arcpy.GetParameterAsText(0) if selection0 == '#' or not selection0: selection0 = "selection0" # provide a default value if unspecified Z_value_field = arcpy.GetParameterAsText(1) if Z_value_field == '#' or not Z_value_field: Z_value_field = "inmval" # provide a default value if unspecified # overwrite existing files arcpy.gp.overwriteOutput = 1 # Local variables: Spline_sele37 = os.path.join(arcpy.env.scratchWorkspace, "scratch.gdb\\result") # Process: Spline try: arcpy.gp.Spline_sa(selection0, "inmval", Spline_sele37) except Exception as e: msgs = arcpy.GetMessages(2) arcpy.AddError(msgs) arcpy.AddError(e.message) sys.exit() arcpy.SetParameter(2, Spline_sele37)
000856 : An error was encountered while executing <value>.Resource CenterDescriptionThere was a problem encountered while executing the specified tool. There are several possible causes for this situation, so you might need to investigate several possibilities to resolve it.SolutionCheck that the syntax is correct, the input datasets exist as specified and are valid, and that you are able to write to the output location.Ensure that you have sufficient resources on your machine to complete the process.Check the documentation for any notes or usage tips that may apply.Contact technical support for assistance if you still cannot resolve the problem.
dstfile = os.path.join(arcpy.env.scratchFolder, "Spline_selec3")
# Import arcpy module import arcpy from arcpy import env from arcpy.sa import * # Check out any necessary licenses arcpy.CheckOutExtension("spatial") # Local variables: selection0 = "selection0" dstfile = arcpy.env.scratchFolder + "Spline_selec3" #dstfile = "%scratchFolder%\\Spline_selec3" outSpline = Spline(selection0, "inmval", weight="0.1", number_points=24, spline_type="REGULARIZED") outSpline.save(dstfile)
Přihlášení členové mohou přispívat, sledovat aktualizace a další. Jste tu noví? Zaregistrujte si bezplatný účet.
Find useful guides, FAQs, and documents to help you navigate and make the most of Esri Community.