JOSM/Plugins/Routes

From OpenStreetMap Wiki
< JOSM‎ | Plugins
Jump to: navigation, search
Available languages — JOSM/Plugins/Routes
Afrikaans Alemannisch aragonés asturianu azərbaycanca Bahasa Indonesia Bahasa Melayu Bân-lâm-gú Basa Jawa Baso Minangkabau bosanski brezhoneg català čeština dansk Deutsch eesti English español Esperanto estremeñu euskara français Frysk Gaeilge Gàidhlig galego Hausa hrvatski Igbo interlingua Interlingue isiXhosa isiZulu íslenska italiano Kiswahili Kreyòl ayisyen kréyòl gwadloupéyen kurdî latviešu Lëtzebuergesch lietuvių magyar Malagasy Malti Nederlands Nedersaksies norsk norsk nynorsk occitan Oromoo oʻzbekcha/ўзбекча Plattdüütsch polski português română shqip slovenčina slovenščina Soomaaliga suomi svenska Tiếng Việt Türkçe Vahcuengh vèneto Wolof Yorùbá Zazaki српски / srpski беларуская български қазақша македонски монгол русский тоҷикӣ українська Ελληνικά Հայերեն ქართული नेपाली मराठी हिन्दी অসমীয়া বাংলা ਪੰਜਾਬੀ ગુજરાતી ଓଡ଼ିଆ தமிழ் తెలుగు ಕನ್ನಡ മലയാളം සිංහල ไทย မြန်မာဘာသာ ລາວ ភាសាខ្មែរ ⵜⴰⵎⴰⵣⵉⵖⵜ አማርኛ 한국어 日本語 中文(简体)‎ 吴语 粵語 中文(繁體)‎ ייִדיש עברית اردو العربية پښتو سنڌي فارسی ދިވެހިބަސް
Screenshot of the JOSM routing plugin

Routes

Provides an easy possibility to visualize all kinds of relations. Especially handy for route relations. It allows general highlighting of features based on the pattern used in SearchAction.

Usage

After the plugin is installed and enabled you will see two new example layers "Czech hiking trails" and "Cycle routes".

If you want to add custom highlighting you have to add a new file "routes.xml" in a sub-directory "routes" within your JOSM-Plugins folder.

Examples

  • German Public transport routes example highlights bus, tram, light train and cycle routes:
 <?xml version="1.0" encoding="UTF-8"?>
 <routes xmlns="http://www.example.org/routes" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.example.org/routes routes.xsd ">
 <!-- pattern is the same pattern as used in SearchAction -->
 	<layer name="Busrouten">
 		<route color="#FF0000">
 			<pattern>
 			(type:relation line=bus) | (type:relation type=route route=bus) | child(child(type:relation line=bus))
 			</pattern>			
 		</route>
 	</layer>
 	<layer name="Tramrouten">
 		<route color="#0000FF">
 			<pattern>
 			(type:relation line=tram) | (type:relation type=route route=tram) | child(child(type:relation line=tram))
 			</pattern>			
 		</route>
 	</layer>
 	<layer name="S-Bahn-Routen">
 		<route color="#00FF00">
 			<pattern>
 			(type:relation line=light_rail) | (type:relation type=route route=light_rail) | child(child(type:relation line=light_rail))
 			</pattern>			
 		</route>
 	</layer>
  	<layer name="Radwege">
  		<route color="#FF00FF">
  			<pattern>
  			(type:way (ncn=* | (lcn=* | rcn=* ))) | (type:relation type=route route=bicycle)
  			</pattern>
  		</route>
 	</layer>
 </routes>


  • Lane count coloring. To color ways depending on the number of lanes:
	<layer name="lanes">
		<route color="#FF00FF">
			<pattern>
			(((lanes=10 | lanes=9 | lanes=8 | lanes=7) -oneway=yes) | ((lanes=6 | lanes=5 | lanes=4) oneway=yes))
			</pattern>
		</route>
		<route color="#FF0000">
			<pattern>
			((lanes=6 -oneway=yes) | (lanes=3 oneway=yes))
			</pattern>
		</route>
		<route color="#FF3F00">
			<pattern>
			(lanes=5 -oneway=yes)
			</pattern>
		</route>
		<route color="#FF7F00">
			<pattern>
			((lanes=4 -oneway=yes) | (lanes=2 oneway=yes))
			</pattern>
		</route>
		<route color="#FFBF00">
			<pattern>
			(lanes=3 -oneway=yes)
			</pattern>
		</route>
		<route color="#FFFF00">
			<pattern>
			(((lanes=2 | lanes=1) -oneway=yes) | (lanes=1 oneway=yes))
			</pattern>
		</route>
	</layer>

Source code

Source code is available through the openstreetmap repository where plugin sources are hosted.

http://svn.openstreetmap.org/applications/editors/josm/plugins/