POST
|
Just some additional info. There really is no extension for an ESRI format grid so this error message is hard to understand.
... View more
10-02-2018
12:11 PM
|
0
|
2
|
1419
|
POST
|
Any help with the error message below would be appreciated. Thanks, arcpy.env.workspace = outbufferpath
featureClassList = arcpy.ListFeatureClasses()
for featureClass in featureClassList:
for row in arcpy.da.SearchCursor(featureClass,'SHAPE@'):
arcpy.management.Clip(raster, row[0].extent, outrasterpath + featureClass, featureClass, -3.402823e+38, "ClippingGeometry", "MAINTAIN_EXTENT")
Traceback (most recent call last):
File "<string>", line 3, in <module>
File "c:\program files\arcgis\pro\Resources\arcpy\arcpy\management.py", line 15215, in Clip
raise e
File "c:\program files\arcgis\pro\Resources\arcpy\arcpy\management.py", line 15212, in Clip
retval = convertArcObjectToPythonObject(gp.Clip_management(*gp_fixargs((in_raster, rectangle, out_raster, in_template_dataset, nodata_value, clipping_geometry, maintain_clipping_extent), True)))
File "c:\program files\arcgis\pro\Resources\arcpy\arcpy\geoprocessing\_base.py", line 496, in <lambda>
return lambda *args: val(*gp_fixargs(args, True))
arcgisscripting.ExecuteError: Failed to execute. Parameters are not valid.
ERROR 000445: Extension is invalid for the output raster format.
Failed to execute (Clip).
... View more
10-02-2018
12:03 PM
|
0
|
17
|
2549
|
POST
|
import arcpy
arcpy.env.overwriteOutput = 1
# in path to raw line data
arcpy.env.workspace = r"S:\General-Offices-GO-Trans\SLR-Mapping\GIS_Projects_2018\Smart_T_Line_Model\geodata\TEST_LINES.gdb"
# out path to buffered lines
outbufferpath = r"S:\General-Offices-GO-Trans\SLR-Mapping\GIS_Projects_2018\Smart_T_Line_Model\geodata\TEST_BUFFER.gdb"
# BUFFER LINE FEATURES FROM RAW LINE DATA FOLDER TEST_LINES.GDB"
featureClassList = arcpy.ListFeatureClasses()
for featureClass in featureClassList:
arcpy.Buffer_analysis(featureClass, outbufferpath, "1250 Feet", "FULL", "ROUND", "NONE")
There is an error somewhere in the arcpy.Buffer_analysis line of code. Can anyone assist? Thanks! Here is what is returned after arcpy command: arcpy.analysis.Buffer(featureClass, outbufferpath + featureClass, "1250 Feet", "FULL", "ROUND", "NONE") Traceback (most recent call last): File "<string>", line 1, in <module> File "c:\program files\arcgis\pro\Resources\arcpy\arcpy\analysis.py", line 1098, in Buffer raise e File "c:\program files\arcgis\pro\Resources\arcpy\arcpy\analysis.py", line 1095, in Buffer retval = convertArcObjectToPythonObject(gp.Buffer_analysis(*gp_fixargs((in_features, out_feature_class, buffer_distance_or_field, line_side, line_end_type, dissolve_option, dissolve_field, method), True))) File "c:\program files\arcgis\pro\Resources\arcpy\arcpy\geoprocessing\_base.py", line 496, in <lambda> return lambda *args: val(*gp_fixargs(args, True)) arcgisscripting.ExecuteError: ERROR 000229: Cannot open T_0517__BRI_DJS_TP_34_5_1Failed to execute (Buffer).
... View more
10-02-2018
06:22 AM
|
0
|
1
|
1073
|
POST
|
Joshua, The script ran without an error but I did not see new features created in the outbufferpath folder. Thanks, Jim
... View more
09-26-2018
08:57 AM
|
0
|
1
|
932
|
POST
|
In the attached script I'm getting an "ERROR 000229". I have attached the script. Please note that the line of code to run the clip to raster is not part of the script yet. Thanks, Jim import arcpy
arcpy.env.overwriteOutput = 1
arcpy.env.workspace = r"S:\General-Offices-GO-Trans\SLR-Mapping\GIS_Projects_2018\Smart_T_Line_Model\geodata\TEST_LINES.gdb"
outbufferpath = r"S:\General-Offices-GO-Trans\SLR-Mapping\GIS_Projects_2018\Smart_T_Line_Model\geodata\TEST_BUFFER.gdb"
outrasterpath = r"S:\General-Offices-GO-Trans\SLR-Mapping\GIS_Projects_2018\Smart_T_Line_Model\geodata\TEST_RASTERCLIP.gdb"
raster = r"S:\General-Offices-GO-Trans\SLR-Mapping\GIS_Projects_2018\Smart_T_Line_Model\geodata\STLM_NSP.gdb\MN_DEM3second"
featureClassList = arcpy.ListFeatureClasses()
for featureClass in featureClassList:
arcpy.Buffer_analysis(featureClass, outbufferpath, "1250 Feet", "FULL", "ROUND")
Traceback (most recent call last):
File "<string>", line 2, in <module>
File "c:\program files\arcgis\pro\Resources\arcpy\arcpy\analysis.py", line 1098, in Buffer
raise e
File "c:\program files\arcgis\pro\Resources\arcpy\arcpy\analysis.py", line 1095, in Buffer
retval = convertArcObjectToPythonObject(gp.Buffer_analysis(*gp_fixargs((in_features, out_feature_class, buffer_distance_or_field, line_side, line_end_type, dissolve_option, dissolve_field, method), True)))
File "c:\program files\arcgis\pro\Resources\arcpy\arcpy\geoprocessing\_base.py", line 496, in <lambda>
return lambda *args: val(*gp_fixargs(args, True))
arcgisscripting.ExecuteError: ERROR 000229: Cannot open T_0517__BRI_DJS_TP_34_5_1
Failed to execute (Buffer).
... View more
09-26-2018
08:35 AM
|
0
|
4
|
1250
|
POST
|
Thanks for the sample data. Here's the error message and script using the sample data. I created a mosaic dataset under Data.gdb for the clipped rasters. Not sure if that is OK. Creating Feature Layer for 1 Clipping raster Runtime error Traceback (most recent call last): File "<string>", line 14, in <module> File "c:\program files (x86)\arcgis\desktop10.3\arcpy\arcpy\management.py", line 13594, in Clip raise e ExecuteError: ERROR 000732: Input Raster: Dataset C:\temp\clips\SampleData\Data.gdb\DEM.tif does not exist or is not supported import arcpy
arcpy.env.overwriteOutput = 1
shapefile = r"C:\temp\clips\SampleData\Data.gdb\Linebuf_geo"
raster = r"C:\temp\clips\SampleData\Data.gdb\DEM.tif"
with arcpy.da.SearchCursor(shapefile, "LineNum") as cursor:
for row in cursor:
print("Creating Feature Layer for " + str(row[0]))
arcpy.MakeFeatureLayer_management(shapefile, "fLayer", "LineNum = '" + row[0] + "'")
desc = arcpy.Describe("fLayer")
extent = str(desc.extent.XMin) + " " + str(desc.extent.YMin) + " " + str(desc.extent.XMax) + " " + str(desc.extent.YMax)
print("Clipping raster")
arcpy.Clip_management(raster, extent, r"C:\temp\clips\SampleData\Data.gdb\LineNum_Clips\DEM_" + str(row[0]), "fLayer", "", "ClippingGeometry", "MAINTAIN_EXTENT")
del cursor
... View more
08-28-2018
08:25 AM
|
0
|
2
|
344
|
POST
|
Hi Jake, The zip file did not have a clipping polygon shapefile. Did you intend to send that? Thanks, Jim
... View more
08-28-2018
06:49 AM
|
0
|
1
|
927
|
POST
|
Hi Jake, I tried re-running with outputs to tif format. Unfortunately, the script seems to run fine but no tif files are appearing in the “clips” subfolder. Kind of strange. Here’s what a file should look like spatially, created interactively. Thanks for helping out. Jim Fritz, GISP Xcel Energy | Responsible By Nature Sr. Geospatial Analyst 414 Nicollet Mall, 6th Floor, Minneapolis, MN 55401 P: 612.330.6956 C: 781.588.5829 F: 612.330.6590 E: james.w.fritz@xcelenergy.com<mailto:james.w.fritz@xcelenergy.com>
... View more
08-27-2018
11:16 AM
|
0
|
6
|
927
|
POST
|
After running the script over the weekend no clipped rasters were created. The script showed each polygon being created (selected?) and a clip created. Unfortunately, when I checked the grid folder there were none there. Any ideas?? Thanks, Jim import arcpy
arcpy.env.overwriteOutput = 1
shapefile = r"S:\General-Offices-GO-Trans\SLR-Mapping\GIS_Projects_2018\Smart_T_Line_Model\geodata\STLM_NSP.gdb\LineBuf_geo"
raster = r"S:\General-Offices-GO-Trans\SLR-Mapping\GIS_Projects_2018\Smart_T_Line_Model\geodata\MN_DEM3second"
with arcpy.da.SearchCursor(shapefile, "LineNum") as cursor:
for row in cursor:
print("Creating Feature Layer for " + str(row[0]))
arcpy.MakeFeatureLayer_management(shapefile, "fLayer", "LineNum = '" + row[0] + "'")
desc = arcpy.Describe("fLayer")
extent = str(desc.extent.XMin) + " " + str(desc.extent.YMin) + " " + str(desc.extent.XMax) + " " + str(desc.extent.YMax)
print("Clipping raster")
arcpy.Clip_management(raster, extent, r"S:\General-Offices-GO-Trans\SLR-Mapping\GIS_Projects_2018\Smart_T_Line_Model\geodata\clips\DEM_" + str(row[0]), "fLayer", "", "ClippingGeometry", "MAINTAIN_EXTENT")
del cursor123456789101112131415
... View more
08-27-2018
07:10 AM
|
0
|
8
|
927
|
POST
|
Hi Jake, I just wanted to thank you again for the script. However, I am still waiting for the first raster to be clipped and was wondering if you had any idea on why it might be taking so long. When I do the processing interactively (on just one query) the clip takes less than a couple minutes to process. Any ideas? Thanks, Jim Fritz, GISP Xcel Energy | Responsible By Nature Sr. Geospatial Analyst 414 Nicollet Mall, 6th Floor, Minneapolis, MN 55401 P: 612.330.6956 C: 781.588.5829 F: 612.330.6590 E: james.w.fritz@xcelenergy.com<mailto:james.w.fritz@xcelenergy.com>
... View more
08-24-2018
10:46 AM
|
0
|
0
|
927
|
POST
|
Re-running right now and no issues so far. I'll keep you posted. Many thanks, Jake and Dan!
... View more
08-24-2018
09:01 AM
|
0
|
0
|
927
|
POST
|
This could be a projection issue, bad me. I'm going to project the polygon layer to geographic to match the DEM. I'll try running the script again after the fix.
... View more
08-24-2018
08:48 AM
|
1
|
9
|
927
|
POST
|
OK thanks but still getting an error (for some reason I can't post in Python format): >>> import arcpy arcpy.env.overwriteOutput = 1 shapefile = r"S:\General-Offices-GO-Trans\SLR-Mapping\GIS_Projects_2018\Smart_T_Line_Model\geodata\LineBuf.shp" raster = r"S:\General-Offices-GO-Trans\SLR-Mapping\GIS_Projects_2018\Smart_T_Line_Model\geodata\MN_DEM3second" desc = arcpy.Describe(raster) extent = str(desc.extent.XMin) + " " + str(desc.extent.YMin) + " " + str(desc.extent.XMax) + " " + str(desc.extent.YMax) with arcpy.da.SearchCursor(shapefile, "LineNum") as cursor: for row in cursor: print("Creating Feature Layer for " + str(row[0])) arcpy.MakeFeatureLayer_management(shapefile, "fLayer", "LINENUM = '" + row[0] + "'") print("Clipping raster") arcpy.Clip_management(raster, extent, r"S:\General-Offices-GO-Trans\SLR-Mapping\GIS_Projects_2018\Smart_T_Line_Model\geodata\DEM_" + str(row[0]), "", "fLayer", "MAINTAIN_EXTENT") del cursor Creating Feature Layer for 0517 Clipping raster Runtime error Traceback (most recent call last): File "<string>", line 14, in <module> File "c:\program files (x86)\arcgis\desktop10.3\arcpy\arcpy\management.py", line 13594, in Clip raise e ExecuteError: ERROR 000622: Failed to execute (Clip). Parameters are not valid. ERROR 000800: The value is not a member of ClippingGeometry | NONE. >>>
... View more
08-24-2018
08:35 AM
|
0
|
3
|
927
|
Title | Kudos | Posted |
---|---|---|
1 | 08-24-2018 08:48 AM | |
2 | 11-16-2018 07:17 AM | |
1 | 10-29-2018 09:11 AM | |
1 | 07-26-2013 09:41 AM | |
1 | 08-25-2014 01:34 PM |
Online Status |
Offline
|
Date Last Visited |
11-11-2020
02:23 AM
|