For terrain editing we should be able to select single vertex and change it's height. Or area of vertices with decreasing power from middle of area to borders (like brushes for bitmaps editors).
Study how works OpenGL's gluUnProject and how it may be used.
Prepare demo with examples of mouse touches and colored selected nearest vertex and triangle under touch.