Select to view content in your preferred language

Focal statistics coordinate shift

5421
17
06-16-2017 03:13 AM
JohannaTorppa1
New Contributor

In focal statistics, if the size of the neighbourhood is larger than a specific limit (for example 2 for circular radius), the output raster is shifted by the size of the neighbourhood... Seems like a bug, or is there a way to avoid this? ArcGIS Pro version 1.4.1.

0 Kudos
17 Replies
JayantaPoddar
MVP Esteemed Contributor

What happens if you use Snap Raster (Environment setting)—Geoprocessing | ArcGIS Desktop to the original Raster dataset?



Think Location
DanPatterson_Retired
MVP Emeritus

An image might help..

This goes beyond a snap raster issue perhaps, have you explicitly set all your environment options in the Environments tab of the tool?  Cell size, extent, snap raster etc all need to be set explicitly (never assume anything). and the calculation is made for the core cell in the neighbourhood specified

JohannaTorppa1
New Contributor

Thank you both Jayanta and Dan !

Below is a the result FS image (grayscale), input raster (layer below the FS image) and imput parameters + environmental variables.

How I see it is that the center point is shifted by radius-1 pixels to north-west. Output crd stystem is that of the input raster and Current Map, so no transformations are needed. The raster used in Snap and Mask coincides for sure with the input raster, and is in the same crd system as the input. The tool works fine for Radius=2, but for 3 and higher, the FS image is always shifted as radius-1. 

0 Kudos
DanPatterson_Retired
MVP Emeritus

I would send it to support for confirmation Johanna

ChristopherDavid1
New Contributor

Hi Johanna, I'm having the same exact problem running as a python script with the 10.5 arcpy library. The larger my neighborhood, the larger the shift (in my case also to the northwest). Looking forward to seeing the solution Esri support comes up with!

0 Kudos
DanPatterson_Retired
MVP Emeritus

You should report it to Christopher... the more confirmations, the bigger the problem, the faster the solution

0 Kudos
ChristopherDavid1
New Contributor

Thanks Dan. I will submit it. For what it's worth, my troubleshooting led me to the analysis mask. Removing the mask for focal stats allowed it to run without shifting the result, for some reason.  I'm not sure why that worked, but hopefully Esri support will be able to figure it out.  I added the mask back after running focal stats and it clipped the results of future tools to my study area.  (Note: this worked for my workflow, since I was ignoring no data cells in focal stats)

MichaelShaw1
New Contributor

This problem appears to exist within ArcGIS 10.6.1.  Is there are work around for this?  I have attempted to use the shift and snaps functions however does not resolve the problem.

0 Kudos
JuanLaguna
Esri Contributor

Hello, Johanna.

Do you have access to more recent version of ArcGIS Pro?  There is a similar-sounding issue to yours that was resolved for ArcGIS Pro 2.3 (and ArcMap 10.7).  If you are able to try out your scenario with those versions of the software (or later), please let me know the outcome.  Hopefully your issue will be resolved, but if not, we can work on getting your scenario delivered so we can investigate further here.

You can reach out to your Support contact to check on the original problem report, BUG-000106677.

Cheers,

Juan