Author Topic: color of track according to speed/altitude  (Read 4308 times)

Offline golgot

  • More than Newbie
  • *
  • Posts: 34
    • View Profile
color of track according to speed/altitude
« 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)...
« Last Edit: January 01, 1970, 01:00:00 by Guest »
 

Offline menion

  • Administrator
  • Professor of Locus
  • *****
  • Posts: 9936
  • Thanked: 53 times
    • View Profile
    • http://www.asamm.com
  • Device: SGS7
Re: color of track according to speed/altitude
« Reply #1 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?
« Last Edit: January 01, 1970, 01:00:00 by Guest »
Ideas, wishes, problems
Advanced topics, public discussion, sharing of knowledges, testing beta versions: you're here!
 

Offline golgot

  • More than Newbie
  • *
  • Posts: 34
    • View Profile
Re: color of track according to speed/altitude
« Reply #2 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...  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...
« Last Edit: January 01, 1970, 01:00:00 by Guest »
 

Offline berkley

  • Premium
  • Master of Locus
  • ****
  • Posts: 900
    • View Profile
  • Device: 1+1, N7
Re: color of track according to speed/altitude
« Reply #3 on: April 17, 2011, 18:52:06 »
Hi,

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

Cheers, berkley
« Last Edit: January 01, 1970, 01:00:00 by Guest »
Search before posting!!!
XDA Orbit, HTC Touch HD, SGS1, SGS2, Nexus S, S4 Active, OnePlus One, Innos D6000
OnePlus X
 

Offline menion

  • Administrator
  • Professor of Locus
  • *****
  • Posts: 9936
  • Thanked: 53 times
    • View Profile
    • http://www.asamm.com
  • Device: SGS7
Re: color of track according to speed/altitude
« Reply #4 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 ..
« Last Edit: January 01, 1970, 01:00:00 by Guest »
Ideas, wishes, problems
Advanced topics, public discussion, sharing of knowledges, testing beta versions: you're here!
 

Offline golgot

  • More than Newbie
  • *
  • Posts: 34
    • View Profile
Re: color of track according to speed/altitude
« Reply #5 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...
« Last Edit: January 01, 1970, 01:00:00 by Guest »
 

Offline menion

  • Administrator
  • Professor of Locus
  • *****
  • Posts: 9936
  • Thanked: 53 times
    • View Profile
    • http://www.asamm.com
  • Device: SGS7
Re: color of track according to speed/altitude
« Reply #6 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 :)
« Last Edit: January 01, 1970, 01:00:00 by Guest »
Ideas, wishes, problems
Advanced topics, public discussion, sharing of knowledges, testing beta versions: you're here!
 

Offline golgot

  • More than Newbie
  • *
  • Posts: 34
    • View Profile
Re: color of track according to speed/altitude
« Reply #7 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?
« Last Edit: January 01, 1970, 01:00:00 by Guest »
 

Offline golgot

  • More than Newbie
  • *
  • Posts: 34
    • View Profile
Re: color of track according to speed/altitude
« Reply #8 on: May 04, 2011, 17:23:27 »
was I clear  :?:   :?  :?:
« Last Edit: January 01, 1970, 01:00:00 by Guest »
 

Offline menion

  • Administrator
  • Professor of Locus
  • *****
  • Posts: 9936
  • Thanked: 53 times
    • View Profile
    • http://www.asamm.com
  • Device: SGS7
Re: color of track according to speed/altitude
« Reply #9 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 ...
« Last Edit: January 01, 1970, 01:00:00 by Guest »
Ideas, wishes, problems
Advanced topics, public discussion, sharing of knowledges, testing beta versions: you're here!
 

Offline elmuSSo

  • Premium
  • Apprentice of Locus
  • **
  • Posts: 116
    • View Profile
Re: color of track according to speed/altitude
« Reply #10 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..
« Last Edit: January 01, 1970, 01:00:00 by Guest »
 

Offline menion

  • Administrator
  • Professor of Locus
  • *****
  • Posts: 9936
  • Thanked: 53 times
    • View Profile
    • http://www.asamm.com
  • Device: SGS7
Re: color of track according to speed/altitude
« Reply #11 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
« Last Edit: January 01, 1970, 01:00:00 by Guest »
Ideas, wishes, problems
Advanced topics, public discussion, sharing of knowledges, testing beta versions: you're here!
 

Offline Fykantrollet

  • Newbie
  • *
  • Posts: 8
    • View Profile
Re: color of track according to speed/altitude
« Reply #12 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!
« Last Edit: January 01, 1970, 01:00:00 by Guest »
 

Offline menion

  • Administrator
  • Professor of Locus
  • *****
  • Posts: 9936
  • Thanked: 53 times
    • View Profile
    • http://www.asamm.com
  • Device: SGS7
Re: color of track according to speed/altitude
« Reply #13 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
« Last Edit: January 01, 1970, 01:00:00 by Guest »
Ideas, wishes, problems
Advanced topics, public discussion, sharing of knowledges, testing beta versions: you're here!
 

Offline Khaytsus

  • More than Newbie
  • *
  • Posts: 99
    • View Profile
Re: color of track according to speed/altitude
« Reply #14 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?
« Last Edit: January 01, 1970, 01:00:00 by Guest »