Resample method not defined in arcpy

1060
2
Jump to solution
11-14-2019 07:33 AM
JintongWu
New Contributor

Hi

I want to use resampling methods in ArcMap to alter the resolution of my raster data. I was able to test and use the resample tool in the toolbox in the ArcMap (I am using 10.5), but when I use "resampled = Resample_management (blockStat, out_raster, "2.5 2", "NEAREST")" in my python window, the error message shows up and says

Runtime error
Traceback (most recent call last):
File "<string>", line 34, in <module>
NameError: name 'Resample_management' is not defined

It seems like the resample methods is not a defined function in the arcpy module. I googled and see no post discussing a similar problem. Could it be that I need to update my ArcMap version?

Thanks,

JT

0 Kudos
1 Solution

Accepted Solutions
JoeBorgione
MVP Emeritus

This says it exists for you:  Resample—Help | ArcGIS Desktop 

I suspect you need to preface it with arcpy.Resample_management() in your script.

That should just about do it....

View solution in original post

0 Kudos
2 Replies
JoeBorgione
MVP Emeritus

This says it exists for you:  Resample—Help | ArcGIS Desktop 

I suspect you need to preface it with arcpy.Resample_management() in your script.

That should just about do it....
0 Kudos
JintongWu
New Contributor

Thanks!

0 Kudos