Automating the Analysis of Spatial Grids