Cashgen - (kinda) Infinite Procedural World Generator

Hi! I’m trying to procedurally place trees, foliage, etc depending on height, slope, etc…
Is there a function somewhere that can return the (Z)-height/slope of the terrain at (X,Y)-Location?
I know I can use raycasts for this, but I was hoping that this information was already stored somewhere in code so that it would be faster than performing traces all the time.