Select to view content in your preferred language

Clip function has different results when saving to folder outside the gdb

242
3
03-18-2025 09:59 PM
Labels (1)
gsilva
by
Emerging Contributor

I am running a script to clip a bunch of rasters to an extent (first pic), noticed it gave me wacky results (second pic). So then I ran the clip tool from the desktop app, and it worked as I intended it to (third pic), then used the copy python command and the only thing I changed was the output folder, and that went from giving me the intended result (3rd) to the same weird result I have been getting (2nd). Does anyone know why this would happen and if so how to fix it? I am running it on 270 rasters so I am not going to do them each manually, but I think it's really frustrating that it is being so inconsistent for no apparent reason. 

gsilva_0-1742360150884.png

gsilva_1-1742360221929.png

gsilva_2-1742360290509.png

 

 

 

0 Kudos
3 Replies
DanPatterson
MVP Esteemed Contributor

did you specify a *,tif for the filename? If not you are getting an esri grid.  Try *.tif for the output raster type and see if it persists


... sort of retired...
0 Kudos
gsilva
by
Emerging Contributor

Yes, I did specify .tif that was what I changed in the output file name along with a folder outside the project gdb. 

0 Kudos
DanPatterson
MVP Esteemed Contributor

What was the "copy python command" snippet?  Perhaps the snippet doesn't use specific environments that the tool does.  I assume that you were using

Clip Raster (Data Management)—ArcGIS Pro | Documentation

in the first place


... sort of retired...
0 Kudos