Author Topic: Colour coded bicycle routes  (Read 12362 times)

Offline Wojtas82

  • More than Newbie
  • *
  • Posts: 92
  • Thanked: 1 times
    • View Profile
  • Device: Xperia S
Colour coded bicycle routes
« on: June 11, 2014, 11:23:59 »
Here's a theme that is focused on bicycle routes in Poland.
It works with Popej's map which is availible here:

http://www.gmaptool.eu/en/content/locus-poland-osm

 It is still being developed so if you have any feature suggestions please post it.



Installation:
Unpack to Locus>mapsVector>Themes








« Last Edit: May 08, 2015, 21:02:12 by Wojtas82 »
 
The following users thanked this post: Emil Ptasiński

Offline jusc

  • Global Moderator
  • Professor of Locus
  • *****
  • Posts: 1898
  • Thanked: 19 times
    • View Profile
  • Device: Samsung Galaxy S2 and Note 2
Re: Colour coded bicycle routes
« Reply #1 on: June 11, 2014, 20:46:38 »
Did you try the Poland map from Locus Store and use the internal Locus hiking theme already?
Regards J.
 

Offline Wojtas82

  • More than Newbie
  • *
  • Posts: 92
  • Thanked: 1 times
    • View Profile
  • Device: Xperia S
Re: Colour coded bicycle routes
« Reply #2 on: June 12, 2014, 11:13:15 »
It works only for hiking routes.
I wanted to add custom icons with bicycle and a colour of route. Most of the bicycle routes in Poland have tag color=red (example).
Is it possible to create?
Thanks! :)
 

Offline jusc

  • Global Moderator
  • Professor of Locus
  • *****
  • Posts: 1898
  • Thanked: 19 times
    • View Profile
  • Device: Samsung Galaxy S2 and Note 2
Re: Colour coded bicycle routes
« Reply #3 on: June 12, 2014, 12:13:04 »



hmm,
there is blue cycle symbol, but the "way" is red on the map.
If you look into OSM with JOSM, the relation belongs to a regional cycle network (rcn). I fear, that the original Locus map does not use the color value if you choose the cycle theme (this is a question for Petr (voldapet).
But if all regional cycle networks (rcn) in Poland are marked blue (#0000FF) you don´t need the color value, you can use it like this:


Regards J.
 

Offline voldapet

  • Administrator
  • Padavan of Locus
  • *****
  • Posts: 488
  • Thanked: 11 times
    • View Profile
Re: Colour coded bicycle routes
« Reply #4 on: June 12, 2014, 13:07:32 »
You're right Locus vector map and internal themes show symbol only for hiking track and symbol are generated from osmc_symbol tag. http://wiki.openstreetmap.org/wiki/Key:osmc:symbol

If you're interested in I can add "colour" tag into map so you can create own theme that will be possible to change the symbol based on the colour tag. But I can not add all possible colour only some specified list. For example 16 based color http://wiki.openstreetmap.org/wiki/Key:colour

BTW: do you know if osmc_symbol tag is also used for route=bicycle?

*EDIT*
I forgot to mention that you can also user track from Trail.pl. Open Locus > Menu > Web services > Trail.pl



« Last Edit: June 12, 2014, 13:09:05 by voldapet »
 

Offline jusc

  • Global Moderator
  • Professor of Locus
  • *****
  • Posts: 1898
  • Thanked: 19 times
    • View Profile
  • Device: Samsung Galaxy S2 and Note 2
Re: Colour coded bicycle routes
« Reply #5 on: June 12, 2014, 13:14:00 »
Thank you for offering to integrate colors to Cycle maps.
At least for Poland the colors are these http://commons.wikimedia.org/wiki/Category:Diagrams_of_cycling_route_signs_in_Poland

OSMC symbol isn´t used I think. It looks like:


Regards J.
 

Offline voldapet

  • Administrator
  • Padavan of Locus
  • *****
  • Posts: 488
  • Thanked: 11 times
    • View Profile
Re: Colour coded bicycle routes
« Reply #6 on: June 12, 2014, 13:43:09 »
Thank you,
the question is how to create general Locus internal theme... It needs to have some special theme only for Poland...
 

Offline Wojtas82

  • More than Newbie
  • *
  • Posts: 92
  • Thanked: 1 times
    • View Profile
  • Device: Xperia S
Re: Colour coded bicycle routes
« Reply #7 on: June 12, 2014, 14:07:59 »
You're right Locus vector map and internal themes show symbol only for hiking track and symbol are generated from osmc_symbol tag. http://wiki.openstreetmap.org/wiki/Key:osmc:symbol

If you're interested in I can add "colour" tag into map so you can create own theme that will be possible to change the symbol based on the colour tag. But I can not add all possible colour only some specified list. For example 16 based color http://wiki.openstreetmap.org/wiki/Key:colour

BTW: do you know if osmc_symbol tag is also used for route=bicycle?

*EDIT*
I forgot to mention that you can also user track from Trail.pl. Open Locus > Menu > Web services > Trail.pl

Trail.pl does not offer all official bicycle routes. I prefer to use OSM bicycle routes. Could you create one based on colour? 16 colours is fine and symbol would be nice as well.

edit
Here's an example of colour rendering without icons. Full name of route should appear on map as well!
http://osmapa.pl/w/szlaki/?lat=54.51961&lon=18.49805&zoom=14&ol=B
« Last Edit: June 13, 2014, 14:52:12 by gynta »
 

Offline jusc

  • Global Moderator
  • Professor of Locus
  • *****
  • Posts: 1898
  • Thanked: 19 times
    • View Profile
  • Device: Samsung Galaxy S2 and Note 2
Re: Colour coded bicycle routes
« Reply #8 on: June 12, 2014, 17:48:54 »
Thank you,
the question is how to create general Locus internal theme... It needs to have some special theme only for Poland...

You may perhaps add a few lines like:
Code: [Select]


<--- cycle routes for Poland START -->
<rule e="way" k="network" v="*" zoom-min="13" zoom-max="16">
  <rule e="way" k="colour" v="#FF0000">
      <line stroke="#88dc143c" stroke-width="5" stroke-linecap="round"/>
     <symbol  src="file:../symbols/cy-red.svg"  scale="0.5" dx="0" repeat="true"  repeat-gap="50dp" scale-icon-size="15,1.15" />
  </rule>
  <rule e="way" k="colour" v="#0000FF">
     <line stroke="#aa82B1FF" stroke-width="5" stroke-linecap="round"/>
     <symbol  src="file:../symbols/cy-blue.svg"  scale="0.5" dx="0" repeat="true"  repeat-gap="50dp" scale-icon-size="15,1.15" />
  </rule>
.....
</rule>
<--- cycle routes for Poland  END -->
 
Regards J.
 

Offline Wojtas82

  • More than Newbie
  • *
  • Posts: 92
  • Thanked: 1 times
    • View Profile
  • Device: Xperia S
Re: Colour coded bicycle routes
« Reply #9 on: June 12, 2014, 20:28:54 »
Thanks !
I tried to add this lines to internal themes but when selecting it in locus maps keeps on loading and loading...and don't load:) I tried with internal vector maps and with andromaps as well :( What should I do??

edit
And here's the theme in the link, I added the lines into XML file and copied SVG into symbols folder.
Still loading and loading....

Edit:
Here in Poland we classify bicycle routes with icn,rcn, lcn etc but in real life they are marked with signs jusc already posted. My idea is to create a separate theme which will cosider only colours not the clasification icn,lcn etc.

Just let me know if you can add it, then I will create a theme for polish cyclists :) I hope many will be satisfied.
Thanks!
« Last Edit: June 13, 2014, 14:53:10 by gynta »
 

Offline john_percy

  • Master of Locus
  • ****
  • Posts: 689
  • Thanked: 95 times
    • View Profile
  • Device: MotoG
Re: Colour coded bicycle routes
« Reply #10 on: June 13, 2014, 00:15:43 »
"Loading" means an error. Either your xml is badly formed, or a required image resource is missing.
One error is in lines 2035 & 2046
<--- cycle routes for Poland  START --> should be <!-- cycle routes for Poland  START -->
<--- cycle routes for Poland  END --> should be <!-- cycle routes for Poland  END -->
Then you will have to wait for an updated Polish map from voldapet, with the coloured cycle routes included.
« Last Edit: June 13, 2014, 00:26:14 by john_percy »
 

Offline Wojtas82

  • More than Newbie
  • *
  • Posts: 92
  • Thanked: 1 times
    • View Profile
  • Device: Xperia S
Re: Colour coded bicycle routes
« Reply #11 on: June 13, 2014, 07:44:14 »
Ok I get it :)
I made some experiments yesterday and I was able to see bicycle icons on routes but not according to colour, according to icn,lcn tags :)
Ok, so I juest have to wait for a map update, when can I expect it?
Thanks in advance.

 

Offline jusc

  • Global Moderator
  • Professor of Locus
  • *****
  • Posts: 1898
  • Thanked: 19 times
    • View Profile
  • Device: Samsung Galaxy S2 and Note 2
Re: Colour coded bicycle routes
« Reply #12 on: June 13, 2014, 08:24:15 »
@John,
Thank you for help.  :D

@Wojtas82,
if all network tags, like icn reference to red colour and ncn to blue colour (etc) in Poland, there is no need for voldapet to update the maps. Can you test it?
Regards J.
 

Offline Wojtas82

  • More than Newbie
  • *
  • Posts: 92
  • Thanked: 1 times
    • View Profile
  • Device: Xperia S
Re: Colour coded bicycle routes
« Reply #13 on: June 13, 2014, 09:16:41 »
jusc, I already tested it and it works but the situation is a little bit different. For example we have a network of rcn routes which are colour coded in different colours.
If you have a look here:
http://cycling.waymarkedtrails.org/pl/?zoom=10&lat=54.53323&lon=18.37414&hill=0.53&base=0.505&route=1#routes
Extend the list of bicycle routes and you will see some regional routes :

Niebieski Szlak Rowerowy Gdynia - Gdańsk means Blue Bicycle Route
Czerwony Szlak Rowerowy Wokół Długiej Góry - Red Bicycle Route
Zielony Szlak Rowerowy Rumia - Wejherowo - Białogóra - Green Bicycle Route

As you can see they are all regional routes but marked in different colours. So we need a colour tag anyway :)

I was thinking if it's possible to add the signes you send link to for international networks. For example for route Eurovelo R10 we should see a nice R10 sign on the route. I think it should be connected with the name of route but I'm not exactly sure. Still R10 in Poland is coloured green, don't know how it is in different countries. But this is a second step for this theme :)

I hope you understand what I mean.

EDIT.
I'm also a osm editor so some colour tags may be missing I will test and add them into routes. The question is which tags should I use: colour=blue or colour=hex num?
« Last Edit: June 13, 2014, 09:22:15 by Wojtas82 »
 

Offline jusc

  • Global Moderator
  • Professor of Locus
  • *****
  • Posts: 1898
  • Thanked: 19 times
    • View Profile
  • Device: Samsung Galaxy S2 and Note 2
Re: Colour coded bicycle routes
« Reply #14 on: June 13, 2014, 12:02:34 »
hex or colour name?
 <rule ...... k="colour" v="#FF0000|red">  should work for both, so you can decide.


A symbol of bicycle without colour?

you should make a rule what will be overwritten like

 <rule ...... k="colour" v="*|~">
   <symbol  src="file:../symbols/without-colours.svg" ........ >
   <rule ...... k="colour" v="#FF0000|red">
       <symbol  src="file:../symbols/cy-red.svg" ...........>
    </rule>
</rule>

For the moment you have to change colour to network
Regards J.