How to get height map from landscape?

I have to make algorithm that will spawn actors on landscape randomly (that part is done), but then they have to go to nearest location that is flat enough and has grass and water near by (it’s simulation of creating medieval settlements). I assume that I have to take information from material on landscape (texture of green areas) and use it in blueprint to find that nearest acceptable position. The same with height information because I can’t randomly pick a new spot and compare it’s height with actual height it’s not effective. So is there any way to export height/color map of landscape from material and use it in blueprint? I have material landscape from kite demo.