Select to view content in your preferred language

Error with Spatial Analyst Filter tool - Invalid Weight neighborhood mask

3875
13
Jump to solution
11-14-2017 10:41 AM
DavidAskov1
Regular Contributor

I am using ArcCatalog 10.5, running the Filter tool from the Spatial Analyst toolbox. I enter an input and output grid and specify low filter type. I leave the ignore nodata box checked. The inputs to this aren't complicated, but I'm getting an error:

Here are the Messages
Executing: Filter C:\temp\2017-11\multi-model-vis\PNW_4km_2017090900\averages\average00.tif C:\temp\2017-11\multi-model-vis\PNW_4km_2017090900\averages\average00_filterlow.tif LOW DATA
Start Time: Tue Nov 14 09:18:19 2017
ERROR 010333: Invalid Weight neighborhood mask::  C:\PROGRA~2\ARCGIS\DESKTO~1.5\BIN\NBR02
ERROR 010067: Error in executing grid expression.
Failed to execute (Filter).
Failed at Tue Nov 14 09:18:19 2017 (Elapsed Time: 0.26 seconds)

This laptop is actually pretty new, and I have never fiddled around with the file mentioned in the red line. There is no file or folder of that name when I go there in Windows Explorer.

I have two ideas, and any feedback is appreciated.

1) Use the Focal Statistics with the MEAN statistic type. This seems like the same thing as the rectangle with 3x3, or I can create my own 3x3 kernel file with all weights equal (1, for example).

2) Try to create a kernel file at this location.

Has anyone ever experienced this? If you have a file at C:\PROGRA~2\ARCGIS\DESKTO~1.5\BIN\NBR02 (this path is just DOS shorthand for "C:\Program Files (x86)\ArcGIS\Desktop10.5\bin"), can you please attach it to this thread or insert its text in a reply?

thanks! David

0 Kudos
13 Replies
DanPatterson_Retired
MVP Emeritus

xander_bakker‌  for your amusement and notes

Rolling Statistics for grid data... an alternative ...

Now I also have all the common filters (and some not so common) available for use within rolling/moving window functions for raster/grid/array data.  I will post those sometime soon, if I don't forget

XanderBakker
Esri Esteemed Contributor

Hi David Askov , I noticed that you marked a post with a lot of questions as the right answer. If you consider that you answered you own question then it would help other users that that post gets marked as the correct answer. Maybe it is the one where you mention workaround 3. Or simply summarize what is the solution that solved the problem and mark that post as the correct answer. That way it will be easier for others to find the correct answer in case they have the same problem.

DavidAskov1
Regular Contributor

OK, good point. I tried to edit it so I got #3 in with #1 and #2, but I couldn't figure out how. Will post a new entry and mark that as the solution. Thanks for all your input.

0 Kudos
DavidAskov1
Regular Contributor

My best guess as to the problem is that the FILTER tool is trying to write a temporary kernel file into a directory that is forbidden to users who are not administrators. As my non-administrator user, I am unable to create files in that directory (C:\PROGRA~2\ARCGIS\DESKTO~1.5\BIN\), so that would explain the failure. I have 3 work-around solutions for this:

1) Run ArcCatalog as an administrator. Just find it in your start menu and right-click on it and choose "Run as Administrator". You have to have another user/pass login to do this. My work's policy is that users are not administrators, but we have access to an admin account for limited usage. This works for me, but may not for you. Also, it runs as a separate user, so I don't have access to any of my settings (database connections, folder connections, symbols, etc, etc.) from my user. I guess I could switch over to the administrator user full-time, but... yuck.

2) The filter tool with the LOW type is basically the same as FOCAL STATISTICS with the RECTANGLE neighborhood at 3x3 and a MEAN statistics type. That is working fine for me as a non-administrator.

NOTE: My guess is FILTER is running FOCAL STATISTICS with an irregular neighborhood and trying to write out a temp 3x3 kernel file.

3) Use python. This worked fine in both the ArcCatalog command line and a stand-alone script (both running as my non-admin user). It is only the tool in ArcCatalog that gave me an error.