added function to flatten 3D polygon shps
updates while working on BR figures