Multiple Textures on a Terrain using Cycles

I am trying to create a terrain that as the height (z axis) goes up the textures transition from sand, to grass, to rock, to snow. To accomplish this, on the first attempt I used the Creating an Island Environment tutorial from Blender Cookie. Which turned out nice, but two thoughts came to mind. First if I used cycles rendering it would improve performance thereby allowing a much larger scene, and allow me to seamlessly use cycles to create other parts of the scene. And second using texture images would allow for close up views of the terrain, which would allow me try out other some other ideas.

So first I tried creating the terrain in cycles, and after days of looking for an answer I could not figure out how to use nodes to get the same effect, either with static colors or texture images. The only solution I found was to use the basic renderer and then bake that to an image and use it as a texture. But if I need to change something it meant flipping back to the Blender renderer, making the new changes and then baking again. So I went back to the basic renderer where upon trying to use texture images I found that swapping the X and Z axis (as was done in the tutorial) did not work with images as it caused a very undesirable effect. As a last ditch effort I looked into texture paint (hadn’t ever used it before now) and couldn’t figure out how to paint on texture images, it appears you can only use colors. Kind of disappointing, as painting on the images, while a lot more tedious, would allow a more desirable layout of the various textures.

I would like to do something similar to what is in that tutorial but use cycles rendering with texture images. I have spent the better part of a week looking at tutorials, reading forums and blogs, and downloading various models and have not found an answer. So if someone knows of a tutorial that would help it would be greatly appreciated. And if its not possible in cycles or to complex to explain in a post (I don’t mind long reads), how would I use the images instead of colors in the basic renderer?