What I mean is, can/how are texture coords from drawing a texture over the entire terrain, obtained from the terrains vertex data.
To actually state the question properly; how do you generate texture coords for a heightfield terrain? :)