This object is in archive! 

Altitude map (altitude as color gradient)

daddycork shared this idea 8 years ago
Completed

Could it be possible to develop the possibility to see the altitude by color in the parelel map mode ?

Like that :

http://fr-fr.topographic-map.com/places/France-27/

Its much more easy to read than the shadow mode

Sincerely

DC

Best Answer
photo

Good afternoon to all,

few hours ago, I've published new Beta version of Locus Map on Google Play with this feature implemented!

How to:

In menu (Settings > Maps - advanced), in same dialog where you select hill-shading and slope-shading is now one more option. After selecting, you get an option of few, predefined coloring palettes.

What needs to be done:

Currently, I've used just a few very general palettes. What should be welcome improvement is just a better palette for a world and an continents. Otherwise it works fine right? ;)

What you may do:

Locus directory: Locus/data/interpolators

Place into directory files in format "CPT" and Locus offer them for color shading

Where to get them - best site I found: http://soliton.vm.bytemark.co.uk/pub/cpt-city/

Important info: every palette has defined range for colors. Like this palette http://soliton.vm.bytemark.co.uk/pub/cpt-city/esri/hypsometry/eu/tn/europe_2.png.index.html . It has defined range from 0 to 126. Locus anyway take these values as 0 metres - 126 metres, so really usable maybe for a Paris :). It's needed to define these values for expected elevations manually or download palettes that has correct values, like this: http://soliton.vm.bytemark.co.uk/pub/cpt-city/wkp/country/tn/wiki-france.png.index.html

And wish you happy COLORING!

Replies (14)

photo
1

read similar idea month ago here in help.


wait...brb...


found it:

http://help.locusmap.eu/topic/3d_maps_by_using_srtm_files#comment-10260

photo
2

Hmm yes, it is the same idea. But idea from onelook is really lost in quite different idea. Mentioned topic is about real 3D maps. This topic is "just" about coloring maps by altitude (a lot easier task).

photo
2

i know - and so i post the link to the right comment 10260

photo
3

Yes it's about 3D this linked topic, but somebody made a screen shot of what I was looking for. There is this link too


https://thangbui.wordpress.com/2012/06/24/create-map-tiles-from-srtm-data-gdal-and-imagemagick/


So it's possible to have it in Locus ? I didnt understand how to have it, my english is not so good, and my knowledge in computer skills not so developed :)


6ec31ded417246bd9625448cf4cee9e3

photo
2

I hope it will come !!! Could be very usefull :)

photo
1

up :)

photo
1

du nervst...

photo
1

I saw you introduce a colored map for the worlwide vectorial map ! its a good beginning, thanks :)

photo
1

Sorry, it seems I missed that - where can I find a vector map colored according to elevation?

photo
3

Good afternoon to all,

few hours ago, I've published new Beta version of Locus Map on Google Play with this feature implemented!

How to:

In menu (Settings > Maps - advanced), in same dialog where you select hill-shading and slope-shading is now one more option. After selecting, you get an option of few, predefined coloring palettes.

What needs to be done:

Currently, I've used just a few very general palettes. What should be welcome improvement is just a better palette for a world and an continents. Otherwise it works fine right? ;)

What you may do:

Locus directory: Locus/data/interpolators

Place into directory files in format "CPT" and Locus offer them for color shading

Where to get them - best site I found: http://soliton.vm.bytemark.co.uk/pub/cpt-city/

Important info: every palette has defined range for colors. Like this palette http://soliton.vm.bytemark.co.uk/pub/cpt-city/esri/hypsometry/eu/tn/europe_2.png.index.html . It has defined range from 0 to 126. Locus anyway take these values as 0 metres - 126 metres, so really usable maybe for a Paris :). It's needed to define these values for expected elevations manually or download palettes that has correct values, like this: http://soliton.vm.bytemark.co.uk/pub/cpt-city/wkp/country/tn/wiki-france.png.index.html

And wish you happy COLORING!

photo
1

@Menion - 6 hours after your post above V3.16.2.7 is still listed on Google Play. What is the new beta version #?

photo
1

Sorry, small delay ... should be already available.

photo
1

Nice work.

photo
1

Genial, Im really impressed to try that, you're a real boss !!!

photo
1

Glad you like it, hope it will works fine in all cases ;)

photo
1

Hi Menion

I'am a new user of Locus Pro. I like the altitude/color shading feature in locus and now I want to play around with my own colorpalette in my home area (I live in germany in the taunus hills - maximum altitude is 880m).

So I wrote a small program that creates me cpt-files. I tried this one

  1. # created by Jarny
  2. #
  3. # minHeight:0.0 maxHeight:880.0
  4. # minHue:0.1 maxHue:0.9
  5. # steps:5
  6. # COLOR_MODEL = RGB
  7. 0.02551530176.02551530
  8. 176.01122550352.01122550
  9. 352.00255132528.00255132
  10. 528.00132255704.00132255
  11. 704.01120255880.01120255
  12. B255255255
  13. F000
  14. N25500

... and expect 5 different colors in the colorlayer but locus seems to still interpolate the colors. :-(

Did I something wrong or is this a bug in locus?

Best regards

Jarny

Please excuse my bad english

photo
2

Good day Jarny,

I see a problem in a definition of interval. Try to update it to this value


  1. #
  2. # minHeight:0.0 maxHeight:880.0
  3. # minHue:0.1 maxHue:0.9
  4. # steps:5
  5. # COLOR_MODEL = RGB
  6. 0.0 255 153 0 175.0 255 153 0
  7. 176.0 112 255 0 351.0 112 255 0
  8. 352.0 0 255 132 527.0 0 255 132
  9. 528.0 0 132 255 703.0 0 132 255
  10. 704.0 112 0 255 880.0 112 0 255
  11. B 255 255 255
  12. F 0 0 0
  13. N 255 0 0

Problem is that Locus interpolate between defined colors and on first line is defined color for 176.0 metres, but on next line is defined for same elevation different color. Above tiny change should help.

Anyway as I think about it, your description is probably correct / expected, because you just define color for certain interval. Hmm


EDIT: your definition will work correctly in next version

photo
1

Thanks for your quick reply. I now see in my posting that the code editor removes my tabs between the numbers. Sorry for that. I have not notice it yesterday!

I change my algorithm with your correction and it works now as expected. Thanks for the hint with the range interval overlapping. With the next version of Locus a can revert my algo.


Best thanks

Jarny

photo
1

You are welcome.

Ad no worry about removed tabs! When I tried to copy content of your cpt file, even I pressed "cancel" after edit, tabs were removed, weird.

Have a nice weekend

photo
3

I have pimped my algo a little bit an can now create 'pseudo' contour lines.

Standard mapsforge Vectormap:

b3c7ba8e8cde949cd80b4ff771974839

The same map with my generated color palette:

6e88c3c3c2b14914dfdd95e488ea0d2c

The algo is very simple and maybe it can be implemented in later Locus versions. It would be very cool if we can create special color palettes on the fly in the shading dialog. The algo needs min and max height and count of steps. I my case the min height is 300m and max heigth is 880m. I need for example 50 different color steps (about 11 meters per step).

I attach the algorithm source code (Java). Maybe you can use it directly or as inspiration. Its just an idea. With this 'procedural' palettes it is also possible to generate 'pseudo contourlines" without colors between the lines but I dont know if Locus support transparent colors.

Regards

Jarny


*edit* Attaching Java source doesnt work :-(

photo
1

Attached source code as zip file

photo
1

Thanks Jarny, nice sample of possible usage!

It is of course possible to implement some "palette generator" directly into Locus Map app, but not sure if there will be interest for such feature. Anyway feel free to create an new idea where people may vote. Thanks

photo
2

For me it is a condition to use this feature. I go on trips to areas with different min - max height and I don't bother to tune every palette band manually to get a good height resolution, but mainly because slope shading gives me a better picture of terrain characteristic.

photo
1

I like that feature. I already searched for a possibility to make locus use the color palette only for the visible map area. Something like relative shading...adapting min and max to what is visible.

In that way I can see even in regions with less terrain/hills terrain slopes or mini hills. This is helpfull to plan routes to have a great overview over the country.

So I definitely like the Idea to change the color palette or the min max setting.

photo
1

PawelS or Andre - please create a new topic as Menion suggests for a vote. I would vote for your idea. At present I have to try each palette to see which palette work best for the region visited. An automatic palette would be far faster & good enough most of the time.

photo
1

Hi guys


I didn't have much time in the last 3 weeks, so I cant take part of this discussion.

@Menion: Is it possible to use transparent color in my own palette or did locus ignore the alpha values in the color definition?

And I have an additional idea for composing the final map on the screen: It would be cool if we can control the blending of the map and the other shading image (hill, slope or altitude) with a simple slider (0 to 100 stepless, default 50).

0 means: full map opacity, no shading opacity --- we only see the map image

50 means: half map opacity, half shading opacity --- half/half image mixing

100 means: no map opacity, full shading image --- we only see the hill/slope/altitude image

photo
1

Hello Jarny,

currently only red, green, blue values are supported in CPT files. Alpha channel is hardcoded in Locus.

photo
1

Ah ok. Thanks for the reply. So I have to vote ^^ and hope for this feature.


With this feature we are easily able to create the pseudo contourlines of the underlying elevation model on the fly (Very helpful if a map doesn't support static precalculated contourlines)

photo
1

> Alpha channel is hardcoded in Locus.

The Alpha channel should gently correct. Then it will be convenient.

...as well as the hill shadowing...

at least variable in the configuration file

photo
1

> The Alpha channel should gently correct.


Yes, thats what I mean with the slider 0 to 100 stepless.

photo
1

Old thread, but use of Alpha channel values in cpt files is needed...

photo
2

I'm unable to find any official specification of CPT format. Does anyone have any experience with it? Anyway from what I've found, no-one use transparency in CPT files.

Anyway it looks there should be usage for some global "alpha" settings for whole shading feature. I'll reconsider it, thanks.

Replies have been locked on this page!