I was trying to create an image of a fantasy world as viewed from space, and so I was wondering if there is a way to apply a texture to a sphere, separate from the actual color of the sphere, using a color coded height map such as this one
Run the color through a "Seperate HSV" node to get the Hue. Then invert the hue and you'll have a more or less accurate result. If you want to make the mountains taller relative to the grasslands I imagine you could do it using RGB curves node. You may also want to get rid of the sea's variation in depth, so that it doesn't look like the sea is uneven. I would recommend doing that by hand or at least without blender. Let me add, that you don't really want real displacement. You would need extremely dense geometry and it wouldn't look good either. A planet is so large, that its surface imperfections and bumps can not be noticed from space. At least our planet is like that. A simple bump node would give you the detail you need in the reflections (mainly via fresnel). Hope this helps.
A rough outline of one possible technique is to use node-based materials and use the value from the height map to choose which of several other materials should be mixed into the output.
Perhaps the range 0-10 maps to a chunk of the node tree that gives a "sea" BSDF, and 10-12 maps to the "shore" node tree, and then 12-20 are "forest", and 20-28 are "mountain" and 28+ are "snow". You would end up using a lot of math nodes to do the comparisons and mix the node trees for the various biomes. The node tree will get even larger if you want a blended transition between biomes (maybe 27.8-28.2 are blending between mountain and snow).
It could be that you want to use the height texture as a bump map (the
Displacement input of the Cycles Material Output node). This is used to modify the surface normal, but does not affect the geometry of the scene. If you view it face-on it looks good, but if you view it edge-on, the illusion can be destroyed.
Another option is that you want adaptive microdisplacements, which is an Experimental feature (have to enable "experimental" feature set in
Scene properties) which combines the
Adaptive checkbox on the
Subdivision Surface modifier with the
Settings > Displacement > True option in the material. This actually modifies the geometry, and if you magnify the displacement enough you can get some dramatic geometry.
I found a video at https://www.blendernation.com/2016/09/06/quick-tip-blender-2-78-cycles-displacement/ which starts out with the bump map and then shows what options to change to turn it into a displacement map.