ERROR
The error message "010391: Kernel file is not provided or does not exist" is generated in the Focal Statistics Geoprocessing tool when the Neighborhood type is selected as 'weight' or 'irregular'. When using these options in ArcGIS for Desktop 10.2.2, the 'Browse to folder' icon becomes disabled, preventing the user from selecting the kernel file.
This is a known issue that occurs at version 10.2.2.
Note:
Change the folder location paths to match the file location paths on the machine.
Code:
import arcpy
from arcpy import env
from arcpy.sa import *
env.workspace = "D:\\Incident\\New Geodatabase.gdb"
# Local variables:
inRaster = "Clip_image"
inkarnelfile = "D:\\Incident\\testkernal.txt"
neighborhood = NbrIrregular(inkarnelfile)
# Check out any necessary licenses
arcpy.CheckOutExtension("spatial")
# Execute FocalStatistics
outFocalStatistics = FocalStatistics(inRaster, neighborhood, "MINIMUM")
# Save the output
outFocalStatistics.save("D:\\Incident\\New Geodatabase.gdb\\focalstatout")
For ArcGIS for Desktop 10, 10.1, 10.2, 10.2.1, 10.3
Continue selecting the kernel file by clicking the 'Browse to folder' icon to add it into the Focal Statistics tool.
Get help from ArcGIS experts
Download the Esri Support App