qgis / QGIS

QGIS is a free, open source, cross platform (lin/win/mac) geographical information system (GIS)
https://qgis.org
GNU General Public License v2.0
10.34k stars 2.98k forks source link

Imhoff's cartographic palette method for DEM #44019

Open gasato opened 3 years ago

gasato commented 3 years ago

Feature description.

Symbolization for DEM from the cartographic perspective use specific methods for colorization based on specific rules. On of these is the Imhof color scheme for elevation features.

The implementation of the colorization method requires the interpolation of at least of three colors linear ramps at specific topographic height values (from 0 to 500m, from 500 to 4000m and from 4000 to maximun altitude).

My rudimentary implimentation of Imhof method as pseudocode was this:

` create a lowAltitudes raster from dem values between 0 to 500m and colorize with a linear interpolation from RGB(147, 160, 150) to RGB(215, 210, 188)

create a mediumAltitudes from from dem values between 500 to 4000m and colorize with a linear interpolation from RGB(215, 210, 188) to RGB(206, 187, 173)

create a highAltitudes raster from dem values higher than 4000m colorize with a linear interpolation from RGB(206, 187, 173) to RGB (255,255,255)

combine lowAltitudes, mediumAltitudes, highAltitudes ` In order to understand the advantage of Imhof palette againts a simple colorization linear methods I attached a series of images.

image

image

On the left the standard linear color interpolation + shadowed DEM. On the right the Imhof result applied to the same DEM + resolution bumping process (Patterson, http://www.shadedrelief.com/bumping/bumping.html). The original Python code was implemented using Numpy and Image.

I know that a similar method can be applied using QGIS tools by hand but I think it will be worth to have this method include as a standard procedure from DEM colorization.

Additional context

There are some papers and presentations where colorization methods for DEM (an other techniques) can be consulted:

https://www.researchgate.net/publication/275573220_The_Development_and_Rationale_of_Cross-blended_Hypsometric_Tints/figures?lo=1

https://www.researchgate.net/publication/327036206_Relief_visualization_techniques_using_free_and_open_source_GIS_tools

https://adventuresinmapping.com/2020/02/28/condensed-how-to-updated-imhof-style-map-of-switzerland/

https://www.slideshare.net/gasato/el-tratamiento-grfico-de-los-modelos-digitales-de-terreno-fuentes-de-error-la-generalizacin-el-sombreado-y-la-paleta-imhof

kannes commented 2 years ago

Are you sure the color ramp is not already included in http://soliton.vm.bytemark.co.uk/pub/cpt-city/ ?

Currently color ramps in QGIS do not have a way to specify the values at which they should be applied from what I know. I am not sure that would be easy to add (after all some weird parts of the world use data not measured in meters etc.). So to get the color scale into QGIS at all, one easy way would be via cpt-city. The user would have to specify its limits manually then as usual.

gasato commented 2 years ago

I think some of the color ramps available at http://soliton.vm.bytemark.co.uk/pub/cpt-city/ for elevation models can be used to color DEM data following Imhoff's criteria. Some of them are really good.

But the feature request here is not about a specific color ramp type. The topic here is about a mapping technique that can give DEMs a more professional aspect and representative. It is about connecting the colors with the meaning.

There are some other examples here ( he made better than me!!): https://www.arcgis.com/home/item.html?id=1f25b31793cd4e7391b0cd51b9b79783 https://adventuresinmapping.com/2020/02/28/condensed-how-to-updated-imhof-style-map-of-switzerland/ https://www.youtube.com/watch?v=prCju9hOgEU

Cheers

kannes commented 2 years ago

How would you envision this being implemented in QGIS from a user's perspective? Where would they find this feature, what would they have to do, what exactly would it do?

gasato commented 3 weeks ago

@jfmoyen suggest in this comment https://github.com/qgis/QGIS/issues/39746#issuecomment-1398455286

to take the example about how Surfer does

https://surferhelp.goldensoftware.com/colormapeditor.htm

or do something much mor simpler like to have the possibility to assign directly (without tricks) DEM values to each ramp color breakpoint