2

A have a GeoTIFF LIDAR image which display DEM in its color-ramp version (color relief) from blue (minimum value) to red (maximum value) and green (in between).

I don't have the original elevation data.

Is there any application or algorithm to turn this 'color coded' maps into its original DEM? (elevation data).

Suppose from another measurement, I know the elevation at multiple point in the DEM to reference the color-map. (or in case I'm sure that some region is the sea, I'll assign zero to it).

2
  • 3
    No, there is no way to do this, contact the agency you got this data from and ask nicely for the DEM data. This is because even if you know the minimum and maximum you don't know every subtle variation of RGB and multiple elevations can have the same RGB value. Apr 28, 2016 at 4:08
  • Why doesn't the color represent elevation data? What are colors representing in the DEM? How were they assigned to it? Apr 28, 2016 at 11:34

1 Answer 1

1

I believe it is possible, but probably not very accurate. Multiple elevations do not have same RGB value if the ramp is continuous and not like having red at both extremes.

I would probably start by reducing the number of colors and saving the result into a paletted image by using rgb2pct-py. Then, I would vectorize the paletted version with gdal_polygonize. Last step would be to attach height values into the polygons and that would require some manual work with for example QGIS. The polygons will have at this stage the source color as an attribute which saves works because all polygons with the same palette entry can be joined to corresponding height range by the same.

The result depends on how well the color ramp that is used in your maps suits for polygonization.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.