I basically want to pass in getusedcells(), and get back a polygon that encompasses the whole tilemap.
I tried converting each cell in a tilemap into a small 32x32 polygon. Then I merged all of them one by one using Geometry.merge_polygon(). But that has a weird effect, where the left most tile acts as a height limit, and the polygon does not reach above that point. Otherwise this would work great.