Grid processing for heatmap