Does anyone have any experience scripting trees onto a heightmap?

I have looked around this site as well as others to see if this is possible in Unity, but most places I have seen simply refer to manually placing the trees through the tree editor. What I wanted to do was place trees on a heightmap placed on a terrain given a set of (x,y,z) coordinates. I assume this is possible, but I have not seen anything to suggest that it can be done in Unity. Has anyone done something similar or suggest a starting point?

You need to add TreeInstances to the TerrainData of the terrain. See here for the docs on that.