Sewing together pieces of landscape/terrain?

Alright, so I have multiple pieces of terrain, and I need to find some way to either combine them or have each edge’s height match the adjacent tiles (see picture). Is there a button that does this automatically? Thanks for the help in advance!