Writing areas to underlying grid and handling edge-cases