Better grid cell size calculation.