I am getting -9999 values out of the Sample tool (when run in Python using arcpy.sa.Sample or from the dialog box in ArcToolBox). I am sampling a raster based on another raster. I've navigated to the location that is providing -9999 values, and the raster being sampled does not have "NO DATA" values, nor is it close to the edge of the raster extent. Changing the sampling approach from "BILINEAR" to "NEAREST" did not solve the problem. This tool formerly worked when applied to the same data inputs in ArcGIS 10.3.
intermediates_dir = 'C:/smt/spreadgis/intermediate/'
"eucdir" is the raster to be sampled, and contains no missing values
barrier is the raster used to sample "eucdir"
dir_table is the table containing the sampled directions.
arcpy.sa.Sample([intermediates_dir + "eucdir"], barrier, dir_table, "BILINEAR")
As I don't know the cause of the bug (it samples correctly in other locations), I cannot provide a minimum reproducible example.
I searched for similar errors, but due to the frequency of the word "sample" in other contexts, I was unable to find useful results.
Any help in resolving this issue would be appreciated.