I'm using ArcGIS 10.4 and want to export XYZ values of a raster (type: GRID) to a text file. I'm following the procedure recommended by ESRI support. However, it seems that the Sample Tool in spatial analyst toolbox skips a bunch of points. When I display the XY-Data certain rows and points are incorrect, either 0 or -9999 (not displayed).
I tried this with different input data, and i cannot find an explanation at all. I thought this might be because of the ArcGIS instance i was runnning, but I tried the sample tool in an freshly started ArcCatalog window. Almost the same happens there, just that the points are not 100% identically.
Is this a bug, or am I doing something completely wrong? How do I fix this?
It seems to be related to this question from 3 years ago.
Edit: Several new tries (see suggestions below), resulting in different patterns. Could still not find the solution to this problem. Another screenshot with nearly the same area, different zoom, different color scale. -9999 is bright yellow, 0 is dark color.