After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 791485 - HGT import with gradient mapping included
HGT import with gradient mapping included
Status: RESOLVED OBSOLETE
Product: GIMP
Classification: Other
Component: Plugins
git master
Other All
: Normal normal
: ---
Assigned To: GIMP Bugs
GIMP Bugs
Depends on:
Blocks:
 
 
Reported: 2017-12-11 15:44 UTC by Jehan
Modified: 2018-05-24 18:53 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Jehan 2017-12-11 15:44:33 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.
Comment 1 Jehan 2017-12-11 16:38:24 UTC
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.
Comment 2 tobias 2017-12-12 08:09:59 UTC
It would be even nice if the import would map -32767 to alpha.
Comment 3 Alexandre Prokoudine 2017-12-14 12:26:27 UTC
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.
Comment 4 tobias 2017-12-15 09:30:59 UTC
"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
Comment 5 GNOME Infrastructure Team 2018-05-24 18:53:09 UTC
-- 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.