Convert spatial grids to polygons