How to get minimun and maximum height of terrain in specific area

You need to collect all the coordinates present inside the polygon and get the min max height. Check this post about it.