POST
|
I figured it out; buffer arguments were in the wrong order, and missing optional args. This fixed my problem.
... View more
11-11-2019
09:45 AM
|
0
|
0
|
1536
|
POST
|
Right, but that's not the issue I'm having. It's the buffer step that's failing and returning the error. (Also, the process as written has worked in the past, when the buffer step was running).
... View more
11-11-2019
09:15 AM
|
0
|
0
|
1536
|
POST
|
Alright, I changed that. Thanks for the tip! Hope this helps
... View more
11-11-2019
08:21 AM
|
0
|
3
|
1536
|
POST
|
That's just a small mistake in transferring my code over. It's fixed in the current version, but still returning the error, even in the right order
... View more
11-11-2019
06:49 AM
|
0
|
5
|
1536
|
POST
|
import arcpy
arcpy.env.OverwriteOutput = True
class Toolbox(object):
def __init__(self):
self.label = "StreamAnalysisTools"
self.alias = "DBGWetlandRestTools"
# List of tool classes associated with this toolbox
self.tools = [BufferExtract, SlopeAndStreamAnalysis]
class BufferExtract(object):
def __init__(self):
self.label = "1. Identify Study Area"
self.description = "This tool uses a Streamlines Shapefile to create a buffer of 50m, " \
"then uses buffer Features to Extract by Mask from DEM Raster. "
self.canRunInBackground = True
def getParameterInfo(self):
param0 = arcpy.Parameter(
displayName="Input Stream Features",
name="inStreams",
datatype=["DEFeatureClass", "DEShapefile", "DeFeatureDataset", "DELayer"],
parameterType="Required",
direction="Input"
)
param1 = arcpy.Parameter(
displayName="Input Buffer Distance",
name="bufferDist",
datatype="GPLinearUnit",
parameterType="Required",
direction="Input"
)
param1.value = 50
param2 = arcpy.Parameter(
displayName="Output Buffer Features",
name="outBuffer",
datatype="DEFeatureClass",
parameterType="Required",
direction="Output"
)
param3 = arcpy.Parameter(
displayName="Input DEM Raster",
name="inRaster",
datatype="DERasterDataset",
parameterType="Required",
direction="Input"
)
param4 = arcpy.Parameter(
displayName="Output Extracted Raster",
name="outRaster",
datatype="DERasterDataset",
parameterType="Required",
direction="Output"
)
params = [param0, param1, param2, param3, param4]
return params
def isLicensed(self):
if arcpy.CheckExtension("Spatial") == "Available":
return True
else:
return False
def updateParameters(self, parameters):
return
def updateMessages(self, parameters):
return
def execute(self, parameters, messages):
infeatures = parameters[0].valueAsText
bufferdist = parameters[1].valueAsText
outbuffer = parameters[2].valueAsText
inraster = parameters[3].valueAsText
outraster = parameters[4].valueAsText
mask = arcpy.Buffer_analysis(infeatures, bufferdist, outbuffer)
arcpy.gp.ExtractByMask_sa(inraster, mask, outraster)
return
Here is my code segment. I can't figure out what is going wrong, but when I run this, it fails at the buffer stage and returns ERROR 000728: Field (buffer output file) does not exist within table
... View more
11-10-2019
10:22 PM
|
0
|
7
|
1768
|
Online Status |
Offline
|
Date Last Visited |
11-11-2020
02:23 AM
|