Now I’ve implemented it, but It’s not working quite as expected…
The problem is that I get no values from glReadPixels at all, all the float values in the input array are untouched. Probably just a stupid mistake somewhere, maybe some of you can spot it 
GLenum depth_fb;
glGenFramebuffersEXT(1, &depth_fb);
glBindFramebufferEXT(GL_FRAMEBUFFER_EXT, depth_fb);
GLuint depth_rb;
glGenRenderbuffersEXT(1, &depth_rb);
glBindRenderbufferEXT(GL_RENDERBUFFER_EXT, depth_rb);
glRenderbufferStorageEXT(GL_RENDERBUFFER_EXT,
GL_DEPTH_COMPONENT24, width, height);
glFramebufferRenderbufferEXT(GL_FRAMEBUFFER_EXT,
GL_DEPTH_ATTACHMENT_EXT,
GL_RENDERBUFFER_EXT, depth_rb);
// Turn off rendering to color buffer
glDrawBuffer(GL_FALSE);
// Check framebuffer status
GLuint status = glCheckFramebufferStatusEXT(GL_FRAMEBUFFER_EXT);
if(status != GL_FRAMEBUFFER_COMPLETE_EXT)
return false;
glMatrixMode(GL_PROJECTION);
glPushMatrix();
glLoadIdentity();
// Lat/lon coordinates on one tile run from 0-0xffff.
int max_n = 0xffff;
int max_e = 0xffff;
// Elevation is in meters. Just test with a tile I know is between 0 and 3000m.
double min_z = 1.0;
double max_z = 1.0 + 3000.0;
glOrtho(0.0, (GLdouble)max_e,
0.0, (GLdouble)max_n,
min_z, max_z);
glMatrixMode(GL_MODELVIEW);
glPushMatrix();
Transform3f m;
m.lookAt(MtkPoint3f(0.0, 0.0, max_z),
MtkPoint3f(0.0, 0.0, 0.0),
MtkVector3f(0.0, 1.0, 0.0));
glLoadMatrixf(m.val());
// store the screen viewport
glPushAttrib(GL_VIEWPORT_BIT);
glViewport(0, 0, elev_map_w_, elev_map_h_);
glClear(GL_DEPTH_BUFFER_BIT);
glDepthMask(true);
glColorMask(GL_FALSE, GL_FALSE, GL_FALSE, GL_FALSE);
// Draw the tile in geographical coordinates.
drawTileGeo();
// Read back the depth values
int size = width*height;
float* data = new float[size];
for(int i = 0; i < size; i++)
data[i] = 111.0;
glReadPixels(0, 0, width, height, GL_DEPTH_COMPONENT, GL_FLOAT, data);
… and here all the data values are still 111.0