Get flats by boundaries