Select to view content in your preferred language

Snap Raster Issue

1436
6
04-19-2023 07:34 AM
JasonMcEachern
Emerging Contributor

I am on version 3.1.1 and the Environments setting 'Snap Raster' no longer seems to work. The setting is there and you can use it but the resulting raster cells are never coincident.

This seems to be true for the Clip Raster and the Copy Raster geoprocessing tools. I suspect the Snap Raster environmental setting no longer works for any similar tools.

One of my colleagues is at ArcPro version 3.03 and the Snap Raster seems to work just fine in his version.

The image below is to show the cells lack of coincidence. I produced this using the Clip Raster tool version 3.1.1.

JasonMcEachern_0-1681914544908.png

 

 

Tags (2)
6 Replies
JasonMcEachern
Emerging Contributor

Just as a follow up, another colleague suggested I use the Extract by Mask tool and that seems to work and the cells are coincident.

RebekahZehnder
Occasional Contributor

I've noticed the same issue.  At some point, Clip Raster stopped respecting the "NO_MAINTAIN_EXTENT" parameter, and now with 3.1 it doesn't respect the snap raster environment setting, either.  As you pointed out, Extract by Mask provides a workaround, but this is a bug that needs to be fixed.  I have a lot of scripts that use this workflow and are suddenly producing incorrect results.

According to the documentation, maintaining cell alignment is supposed to be the tool's default behavior. 

"NO_MAINTAIN_EXTENTThe cell alignment of the input raster will be maintained and the output extent will be adjusted accordingly. This is the default."

The documentation also says the tool supports the snap raster environment setting.

Tags (1)
0 Kudos
CyrielleLaurent1
Emerging Contributor

I have the same issue and it is greatly impacting the quality and precision of my analyses. I've tried using the snap option on many geoprocessing tools and it seems Extract by Mask is the only one with which it works.

I am disappointed to see that this thread is not getting more replies as I'm not confident that this issue will be getting much attention by ESRI.

CyrielleLaurent1
Emerging Contributor

As a matter of fact, I just tried it with Extract by Mask and the snap didn't work.

I am working on ArcGIS Pro 3.3.1

0 Kudos
RebekahZehnder
Occasional Contributor

Is your mask a vector?  It's been a while since I did this, but if I remember correctly, I think that to use the Extract by Mask workaround, I had to first create a raster for my mask layer that was aligned with my other raster.  If you use polygons and let it create the mask raster on the fly, I think the same problem with not respecting the snap raster happened.

How do we get Esri to see this?

0 Kudos
CyrielleLaurent1
Emerging Contributor

Yes my mask was a vector polygon, after I saw your reply I tried with a raster mask but was unsuccessful. Here is what I tried:

I need to snap two DSM of the same area, one of 2022 and one of 2024 (same spatial resolution of course).

- I clipped DSM 2024 to the area I need to analyse

- Then I use Extract by Mask on the 2022 DSM and used the clipped 2024 DSM as a mask. I also specified I need it to snap to the clipped 2024 DSM

It didn't work. I submitted a ticket to ESRI about this. I will ask them to please fix that issue.

0 Kudos