A data simulator that can facilitate the development of improved sampling and analysis procedures for spatial analysis is proposed. The simulator, implemented in MATLAB, provides a graphical user interface and allows users to generate data layers satisfying given spatial properties and a response variable dependent upon user specified functions. It has a modular structure and is capable of modeling response function heterogeneity (both in spatial coordinates and in driving attribute space) as well as unexplained variance, sensor error, spatial data sampling and interpolation. As an illustration of the potential uses of the simulator in precision agriculture, the effect of sampling density and interpolation on neural network prediction of crop yield was assessed.