GNOME Bugzilla – Bug 791485
HGT import with gradient mapping included
Last modified: 2018-05-24 18:53:09 UTC
HGT files are imported as special-case in: plug-ins/common/file-raw-data.c See bug 771661. HGT values are stored on 16-bit signed integers which are immediate elevation values in meters. It means a single value ranges from -32767 to 32767 meters, with the special exception of -32768 being an "error" value. First consequence is that on earth reliefs, most pixels will be concentrated around gray 0.5 (see level). Highest peak (Everest, 8848m) will be gray 0.635. That makes quite low contrast images by default, which is quite annoying since it may look like import didn't work unless you specifically read about this format specifics. You will need to use "map gradients" for instance to see finally something. An improvement like bug 791458 would help a lot. Yet even so, you still need to understand the format to create a useful gradient, and will probably have to edit the gradient file if you want accurate mapping of colors to elevations. Ideally you could map a gradient at import time, and GIMP would convert gradient [0;1] range and show only meters. Therefore someone who opens a HGT file could choose the color for error pixels, then various color ranges to elevation ranges in meters with appropriate immediate preview.
Just a note: Alexandre was suggesting on twitter that there could be a gradient used by default. Obviously this cannot work because not everyone wants the same colors, and also you may want to tweak your colors for some area (for instance "under sea level" is not always water so symbolically you may want to go for other colors than blue; also if you map a desert in green, that may also not be ideal symbol). Except when GIMP will be non-destructive! In such a case, we could map to a default "pretty ok default" gradient for maps, which would be some gradient map effect layer and can be edited as a second step. This workflow would be good too. So the actual workflow all depends on when (and if) someone will implement this feature: before or after non-destructive editing is done.
It would be even nice if the import would map -32767 to alpha.
My point was more along the lines of "make it look good by default, allow to make further tweaks", where "look good = identical to the rendering from the PDF file". That would involve using a carefully crafted default gradient just for that. AFAIK, we already have a few gradients specifically crafted for different some scripts and plug-ins. So that's nothing new.
"identical to the rendering from the PDF file" is not possible with just a gradient. If you look at the image, it has not only the gradients but also has shadows and highlights. I think they used some kind of bumpmap. https://girinstud.io/log/wp-content/uploads/2017/12/GIMP-import-hgt.png
-- GitLab Migration Automatic Message -- This bug has been migrated to GNOME's GitLab instance and has been closed from further activity. You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.gnome.org/GNOME/gimp/issues/1255.