I've got a script tool in ArcGIS that runs Curvature and Aspect from Spatial Analyst, and the outputs of both contain an extra column. I've attempted to set the extent in the both the tool and the script to be the same as the input file, but still the extra column appears. The same snap raster is used for all process steps, and is a statewide grid of 20-foot cells, the same size as the cells in these rasters.
I could add a tool to extract the area using the original raster, but I'd rather understand the problem.
Here are what I believe to be the relevant lines of code:
fel= glob.glob(inDir+"\\"+"*_fel.tif")[0]# Set Geoprocessing environmentsarcpy.env.compression = "NONE"arcpy.env.rasterStatistics = "STATISTICS 1 1"# arcpy.env.resamplingMethod = "NEAREST"arcpy.env.snapRaster = "[path deleted]"arcpy.env.tileSize = "128 128"arcpy.env.pyramid = "PYRAMIDS -1 NEAREST DEFAULT 75 NO_SKIP"arcpy.env.extent = felarcpy.env.nodata = "NONE"# Process: Curvaturearcpy.gp.Curvature_sa(fel, Curv, "1", Prof, Plan)# Process: Aspectarcpy.gp.Aspect_sa(fel, asp)I'm using ArcGIS 10.3.1 with foreground processing.
This size mismatch makes it so the rest of the script cannot run, and I should also note, it doesn't always happen. Some outputs are the same size.
أكثر...
I could add a tool to extract the area using the original raster, but I'd rather understand the problem.
Here are what I believe to be the relevant lines of code:
fel= glob.glob(inDir+"\\"+"*_fel.tif")[0]# Set Geoprocessing environmentsarcpy.env.compression = "NONE"arcpy.env.rasterStatistics = "STATISTICS 1 1"# arcpy.env.resamplingMethod = "NEAREST"arcpy.env.snapRaster = "[path deleted]"arcpy.env.tileSize = "128 128"arcpy.env.pyramid = "PYRAMIDS -1 NEAREST DEFAULT 75 NO_SKIP"arcpy.env.extent = felarcpy.env.nodata = "NONE"# Process: Curvaturearcpy.gp.Curvature_sa(fel, Curv, "1", Prof, Plan)# Process: Aspectarcpy.gp.Aspect_sa(fel, asp)I'm using ArcGIS 10.3.1 with foreground processing.
This size mismatch makes it so the rest of the script cannot run, and I should also note, it doesn't always happen. Some outputs are the same size.
أكثر...