JOSM/Plugins/Routes

From OpenStreetMap Wiki
Jump to: navigation, search
Help
Available languages
Deutsch English
Screenshot of the JOSM routing plugin

Contents

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.

Example routes files

If you want to create your own routes.xml you can take these as an example:

<?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 ">
	<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>

Source code

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

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

Personal tools
Namespaces
Variants
Actions
site
Toolbox