Locus Map - forum

Support => Wishlist => Implemented => Topic started by: golgot on April 14, 2011, 06:48:36

Title: color of track according to speed/altitude
Post by: golgot on April 14, 2011, 06:48:36
I hope that there is no similar wish on the forum this time. :D (last time I was looking for "picture" but the term used was "pic")
My wish (ok, it's just one of my wishes) is that Locus can be able to plot a track with altitude or speed using different colors (eg green at 0 km/h, Orange at 20 and red at the max speed)...
Title: Re: color of track according to speed/altitude
Post by: Menion on April 14, 2011, 10:14:12
hmm I'm looking at it and cannot find simple and memory efficient way how to do this. Don't you have any inspiration in any other app where this works fine?
Title: Re: color of track according to speed/altitude
Post by: golgot on April 14, 2011, 11:34:11
Locus 3.12? :D

No seriously, I don't know... Looking on Google, it seems that some software are able to do that : http://goopstechnologies.com.. (//http://).  But I don't know if it's cost effective or simple? :)

In the past, I used to have almost the same problem (nothing to do with cartography, it was about wave propagation), and the software I used (Matlab) was able to do that easily (It was only necessary to specify a third color argument for each X,Y ...) And it was really easy to convert a value to a color using RGB values...

But I don't know how do you plot tracks on Locus, so I can't really help...
Title: Re: color of track according to speed/altitude
Post by: berkley on April 17, 2011, 18:52:06
Hi,

this in "My Trails" https://market.android.com/details?id=c ... s.mytrails (https://market.android.com/details?id=com.frogsparks.mytrails)

Cheers, berkley
Title: Re: color of track according to speed/altitude
Post by: Menion on April 18, 2011, 12:29:52
hmm as I thought. Colorization over all track with some gradient isn't possible in android api. Only solution as I discovered and looks that My trails also, is to cut track to single parts and set and draw gradient for every single part.

this have few main disadvanteges

1. more memory required. For every two points (one part) is needed new object that store these values and also two color values (integers) to hold gradient on start and end of this path (between two points)
2. track looks then similar to track on screenshots from My Trails. So it's not connected and slight track but just single lines that not connect perfectly in the ends

So this actually leads to not well looking and more memory required solution. If any developer have any other solution, it will be very welcome. But this one, I think, doesn't worth it. I really like to see too, colorized tracks, but it actually isn't possible in simple way as I see ...

PS: or anyone use My Trails and tracks looks nice, are fast and fluent? If so, I can go through their code on google code and search there a little ..
Title: Re: color of track according to speed/altitude
Post by: golgot on April 18, 2011, 16:42:35
Sure that if you need to draw tracks point per point, it can take some memory.

I don't know Android API, but can you draw sort kind of dotted line? If you can put some "jumps", it may be more memory efficient to
 - extract all part of track where speed is between 0 and 9 km/h (for example) and draw this dotted line in green
 - extract all part of track where speed is between 10 and 19 km/h (for example) and draw this dotted line in orange
 - aso

So you only draw, let's say 10 or 20 dotted lines (according to the gradient of color that you expect) which join together

I'm conscious that this is not really a good solution, but I'm sure is better that doing it point per point
 - this will take far less memory (I think)
 - connection problems will only occur if speed change...
Title: Re: color of track according to speed/altitude
Post by: Menion on April 18, 2011, 16:46:44
this is not possible. Gradient is applied from one place on screen to another. So I have to define gradient from one place (first point) to second (second point). This sounds really weird. Have to check My Trails code :)
Title: Re: color of track according to speed/altitude
Post by: golgot on April 26, 2011, 15:32:48
Hum, I think I was not clear (as usual :)

If fact you don't need to use gradient : Look at the following picture, You've a track with a gradient according let's say to speed.

You divide this track in 3 differents tracks (one green where speed is < maxspeed/3, the second orange where 1/3 * maxspeed<speed<2/3 maxspeed, the last one red where speed > 2/3 maxspeed)..

Now you draw these 3 tracks (without gradients)... Of course, with 3 colors, it's awful, but if your do that with 10 colors or more, it may looks not so bad?
Title: Re: color of track according to speed/altitude
Post by: golgot on May 04, 2011, 17:23:27
was I clear  :?:   :?  :?:
Title: Re: color of track according to speed/altitude
Post by: Menion on May 04, 2011, 18:13:05
yes golgot you was :) It do not have currently so big privilegy so I forgot to answer. This solution is possible but I'm worried it will look terrible :) I have to do some tests when i have some time ...
Title: Re: color of track according to speed/altitude
Post by: elmuSSo on June 07, 2011, 13:04:05
I was thinking about that. What do you think about that:

Instead of manually set the values in options Interval(meters) or Interval(seconds) you could add a new feature "Interval dependant of the current speed" or something like that. For example, these fixed values are great for some of the situations. You should set them differently in different situations (smaller values when on foot, mediocrate when in the car, big values when on train). But maybe Locus could adapt dynamically to your actual speed and dynamically cahnge these values. And then, instead of colouring the track, you could just make the intermediate points visible for the user. So if the user will go faster, the dots/point will be in bigger distances from each other. If the speed was small, dots will be more condensed. For the user this will look darker in the small speed segments, and more lighter in fast speed segments. Of course i understand that painting all that dots will be memory not efficient. But if you will add quick on/off switch just to oversee the certaing fragment of the track..
Title: Re: color of track according to speed/altitude
Post by: Menion on October 21, 2011, 20:52:10
hi guys, task done .... check new testing version

task is done by simply painting every path between recorded points by one color. No gradient ... just for your info. But it looks fine and it's fast enough
Title: Re: color of track according to speed/altitude
Post by: Fykantrollet on October 24, 2011, 19:41:07
Aii looking good!! This is a great addition. I like it a lot!

Two comments;
1) The resolution is in 8 colors if I count correctly. It is a little bit hard to see nuances with the colors ranging from red through purple to blue. Maybe better to go through a different color? For example red-yellow-green or red-blue-black.
2) it would be nice to have two color schemes to choose from.

Thanks for the effort!
Title: Re: color of track according to speed/altitude
Post by: Menion on October 25, 2011, 07:50:11
glad you like it. I would rather have only one scheme then allow some selections. Currently there is 10 colors, I'll try to change it a little bit
Title: Re: color of track according to speed/altitude
Post by: Khaytsus on October 25, 2011, 14:01:46
Quote from: "menion"hi guys, task done .... check new testing version

task is done by simply painting every path between recorded points by one color. No gradient ... just for your info. But it looks fine and it's fast enough
I'm confused how this works.  i enabled it in the settings, how to see it reflected on existing tracks?
Title: Re: color of track according to speed/altitude
Post by: Menion on October 25, 2011, 14:08:56
if you want to apply this on existing tracks, you have to edit every single track (and select this in Edit track screen). In settings is ability to set color of recorded tracks, not already stored ...
Title: Re: color of track according to speed/altitude
Post by: Khaytsus on October 25, 2011, 18:44:02
Quote from: "menion"if you want to apply this on existing tracks, you have to edit every single track (and select this in Edit track screen). In settings is ability to set color of recorded tracks, not already stored ...
Makes sense, how did I miss that!  Works great!
Title: Re: color of track according to speed/altitude
Post by: idk on October 25, 2011, 19:13:08
Haha.. how cool is that? I was just about to write the same request for a feature like this because I've also tried my tracks and found it really helpful.

It is really cool of you Menion, that you interact so great with your customers. There is no doubt, that the little money I spent on Locus Pro is the best spent money for any virtual product I've got! You don't get such a good support for software products that cost 10 times more then Locus Pro!!! Awesome!

Anyway, I've got a question :P

Is it possible, to enable a legend, that shows which speed each color  represents? In "My Tracks" there there is a legend as far as I remember. Didn't find it in Locus, but maybe I'm just blind  :oops:
Title: Re: color of track according to speed/altitude
Post by: Menion on October 25, 2011, 19:29:25
hehe, thanks for nice words. No there isn't legend available, but it's true that it may come handy ... I'll try to create one in some way
Title: Re: color of track according to speed/altitude
Post by: golgot on April 05, 2012, 09:45:45
I'm quite late but, sorry for that, but THANKS A LOT MENION,

All this software is amazing!
Title: Re: color of track according to speed/altitude
Post by: Menion on April 05, 2012, 10:00:35
you're welcome :)