FR:JOSM/Plugins/public transport

From OpenStreetMap Wiki
Jump to navigation Jump to search

broom

Help (89606) - The Noun Project.svg

Greffon Public Transport pour JOSM

Introduction

Le greffon JOSM Public Transport est conçu pour simplifier la cartographie et l'édition des lignes de transport public selon les standard de meilleure pratique (voir Oxmoa scheme). Après quelques instructions d'installation, nous commençons avec un chapitre à propos des exemples d'utilisation : dans la première section, nous décrivons la façon de créer un parcours de bus à partir de zéro. S'il existe déjà une ou plusieurs lignes avec un parcours plus ou moins parallèle, vous pouvez en profiter (voir la seconde section). D'autre part, vous pouvez facilement convertir des parcours depuis d'anciennes données utilisant un autre format vers le schéma Oxmoa (voir la quatrième section). Le chapitre suivant explique les notions utilisées dans ce greffon. Le dernier chapitre contient un manuel de référence de tous les items du greffon.

Ce greffon fait référence à la version prototype du 19/02/2010. Il a été testé avec succès avec la version latest 2940 de JOSM. Il ne fonctionne pas avec la version tested 2561 de JOSM, à cause de changements dans le modèle de données. Il s'agit toujours d'une version bêta, donc n'oubliez pas de sauvegarder votre travail avant et pendant son utilisation. N'hésitez pas à faire des suggestions de simplification, pour des fonctionnalités supplémentaires ou pour me signaler des anomalies (mailto:roland.olbricht(at)gmx.de).


Comment installer le greffon ?

Démarrez JOSM et sélectionnez le menu Édition > Préférences..., puis Greffons > Télécharger la liste. Cochez public_transport dans la liste, puis redémarrez JOSM.


Examples how to Use

Map a Bus Line from Scratch

The Oxmoa schema consists of a relation per direction and contains the itinerary (the way a bus actually takes from its starting stop to its terminus) and the stops served by the bus. Roughly, you need to enter one direction of the itinerary by hand. The stops and the back direction can mostly be derived from that by the software.

Download the area where your bus route takes place. Choose the menu item Public Transport > Route patterns. This opens a window where you can see all public transport routes existing in the downloaded data set. Create a new relation by clicking on the button New. Now change to the tab Tags and set appropriate values for a least route (the type of public transport), ref (the line number) and to (the destination displayed).

Change to the tab Itinerary. Now select on the map the first way that belongs to your route and press Add. Mark the second item and press Add again. You also can select several ways at once and click Add. If your ways are added in the wrong order or with wrong roles, mark them (click the first entry in the window, then shift-click the last entry in the window) and press Sort. If there appear one or more lines [gap], then your ways don't fit together. If sorting won't solve that then there are gaps in your itinerary and you need to add the missing links or split ways (mark the way, the node where to split at and then use menu Tools > Split Way) if your bus service only partly uses them. To help you with the tasks you can:

There are buttons Mark, Show and Find with similar functionality in the tab Stops.

You can delete one or more entries from the list by marking them and clicking Delete. You can also move one or more entry by marking them, clicking on Mark (this copies them to the clipboard, like the middle mouse button on X servers), then Delete, then mark the first item before which you want to insert the items and click Add.

Now you can add the bus stops in a convenient way: change to the tab Meta and press Suggest Stops. This will compile a list of stops that are near the itinerary. You can choose up to which distance from the itinerary stops should be considered and whether stops only the right hand side, only on the left hand side or on both sides are possible. Now change to the tab Stops. You can identify the stops by their entries as follows: click Mark and/or Show. Delete spurious entries by marking them and pressing Delete. Add missing stops by marking them on the map, marking the entry before which you want to insert the stop (unmark all entries if you want to append stops to the end), then press Add.

When you are complete with the forward direction, go back to the tab Overview. Then click Duplicate (this adds a copy of the relation) and click Reflect (this reflects the copy to become the backward direction). Review the itinerary in the tab Itinerary and correct oneways passed in the now wrong direction. Then change to the tab Meta and let you suggest bus stops. Review them. Congratulations, you are done with the entire bus line.

Reuse a partly parallel line

The plugin has an internal clipboard to simplify copying parts of the itinerary or the stops from one bus route to another. Data is put into the clipboard following the X server paradigm. Mark one or more entries from the itinerary list or stops list and click the respective button Mark (in Itinerary, in Stops). The objects themselves are kept by being marked on the map. The plugin additionally saves their order and role. You can paste data from clipboard by using the respective button Add (in Itinerary, in Stops).

To do this, first choose the source route at the tab Overview and then change to the tab Itinerary. Mark there the entries you want to copy and click Mark. Then choose at the tab Overview your destination relation and mark in the tab Itinerary the entry before which you want to paste the entries or unmark all entries if you want to append the data from clipboard.

Stops can be copied in the same way: first choose the source relation at the tab Overview and change to the tab Stops. Mark there the entries you want to copy and click Mark. Then choose at the tab Overview your destination relation and mark at the tab Stops the entry before which you want to paste the entries or unmark all entries if you want to append the data from clipboard.


Reuse an Old Relation

If you have a bus route in an old format, you can spread it with the help of the plugin into separate relations for both (or more) directions. Go to the tab Overview, mark the respective relation and click Duplicate, then Reflect. Now you have a relation for each direction. The remaining task is to cleanup the new relations.

First, mark again the first relation. Go to the tab Itinerary and cleanup the itinerary to contain only the forward direction as described above. Now you can use Suggest Stops from tab Meta to obtain a good guess for the bus stops. Use the tools in the tab Stops to cleanup this list.

Now go back to the tab Overview and select the newly created route. Proceed with the same steps as for the forward direction. Congratulations, now you have corrected the bus line.


Used Notions

Note: I'm not a native English speaker. Thus, if you have suggestions for better wording, please send them to me (mailto:roland.olbricht(at)gmx.de).

clipboard - Beside the operating system, the plugin has an internal clipboard that allows to maintain the order and roles of relation members, in particular bus stops and ways belonging to the itinerary. The clipboard is used similar to the X window system clipboard: there you copy text into the clipboard by marking it with the mouse and paste it by clicking the middle mouse button. We can't assume that every computer has a middle mouse button. Thus, in the plugin you copy data into the internal clipboard by marking the entries and clicking Mark (in Itinerary, in Stops). You paste data by keeping it marked on the map and clicking Add (in Itinerary, in Stops).

entry - An entry in the list of objects that are members of a relation. Here, the relations are public transport routes and members are stops or stations or the ways that constitute the itinerary. The notion entry is used to discriminate between the relation members (entries) and the objects referred to by the relation members (objects on the map).

itinerary - The way a bus service actually takes. Note that buses or other vehicles can't make jumps, thus there cannot be gaps in an itinerary. For that reason, a line [gap] is displayed in the <a href="#subsection.itinerary.list"/>itinerary list</a> whenever the first node of a way differs from the last node of the preceding way.

(bus) line - The notion refers usually to all bus or train services that are offered in a certain network with the same line identifier. The line identifier for a relation is declared by the tag ref.

mark - see select.

network - the set of all services that a organised as a whole by some kind of transport authority. Often, the network is the responsible party for ticket fares. It is used to disambiguate different routes with the same line identifier in different regions. In particular, we assume that in every network a line identifier is unique, i.e. that all relations with the same line identifier constitute a logical unit. The network is declared by the tag network.

node - The respective OSM primitive. The only objects represented by nodes here are stops and stations. Nodes are visible in the JOSM main window and a list of nodes as members of the route relation constitutes the served stops of a public transport route.

Oxmoa scheme - see User:Oxomoa/Public_transport_schema. This plugin implements a subset of the Oxmoa scheme. We implement in particular here the splitting of bus lines into bus routes. This allows to display the correct order of an itinerary and stops even if a section is passed twice or several times. The extra relations per line number on top of the bus route relations aren't implemented yet because there is no known use case for them. Also, the concept stop_position has not been implemented as it causes ambiguities: if it is placed on a non-oneway, the direction of the stop_position is unclear.

In particular, the data model underlying this plugin is as follows: Every bus stop is represented at its road sign by a node with tag highway=bus_stop which is off the road itself, usually a few meters, depending on the width of the street. Every bus route (i.e. every service with distinct starting point, ending point or itinerary) is represented by a relation on its own with tags type=route, route=bus|tram|light_rail|subway|rail and ref set to the line number or line identifier and network set to the network the line belongs to. The name tag may be used if the line has a name but it won't appear somewhere. The relation contains as members the ways which constitute the itinerary the bus actually takes and the bus stops in the order they are served. The member role of the ways is set to either forward or backward, depending on whether the bus passes the street in or against the direction it is drawn in the map.

public transport route - The pattern of passed roads and served stops by a particular public transport service. A (bus) line usually consists of two or more (bus) routes but there are exceptions: bus services only operating in one direction or bus services with the same line number but different branches.

relation - The respective OSM primitive. The only objects represented by relations here are the public transport routes. They are not visible on the JOSM main map but can be edited with this plugin.

select - Unfortunately, there are different things that can be selected. You can and need to mark objects (ways and nodes) on the map in the JOSM main window. Or you can mark entries in the list in one of the tabs Overview, Itinerary or Stops. The former is usually referred to as select on the map, the latter as select an entry. For the entries it is sometimes useful to know that you can mark several entries at once by clicking on the first entry, then shift-clicking on the last entry. You can unmark all entries as follows: click an entry (this marks it and unmarks all other entries) then Ctrl-click it again (this unmarks this entry).

stop - The location where a bus or train calls. It is represented here by the position of the road sign that indicates the bus stop in the real world. In particular, bus stops are always off the road. This is necessary because buses have doors only on one side. Thus, there are no two-directional bus stops. This is in contrast to railway stations: as trains have usually doors on both sides, a train station can and is often used in both directions.

way - The respective OSM primitive. It is visible in the JOSM main window and a list of ways constitutes the itinerary of a bus route. A way has an orientation from its first node to its last node. In JOSM, this is visualised by the direction of the arrows that represent the way. Thus, a vehicle can pass a way in or against its orientation. This is indicated by the role of the relation membership representing the itinerary: forward means that the vehicle passes the way in its orientation while backward means the opposite.


Reference Manual

Tab Overview

List Existing route patterns

The large list in the center contains all relations that are recognised as public transport routes. They are listed with the value of their tag ref, the value of their tag to and the ID of their relation. A relation is considered as public transport service if it has the tags type=route and route is set to one of the values bus, tram, light_rail, subway or rail.

Button Refresh

This button refreshes the list Existing route patterns.

Button New

This button generates a new route pattern.

Button Delete

This button deletes the currently marked route pattern.

Button Duplicate

This button makes a copy of the currently marked route pattern.

Button Reflect

This button changes the direction of the route pattern: the values of the tags to and from are exchanged and the itinerary and the list of the stops are reflected.


Tab Tags

List Required tags

The list contains the five tags that every public transport route must have:

  • type: Must always have the value route.
  • route: Designates the kind of vehicle that performs the service. It can be set to one of the values bus, tram, light_rail, subway or rail.
  • ref: The line identifier of the route.
  • to: The destination shown in front of the vehicle and/or at the platform to clarify the direction of the service. It is usually the name of the terminus. Compare the tag direction.
  • network: The network this route belongs to.

List Common tags

The list contains further tags which are quite common for public transport routes:

  • direction: The destination shown in front of the vehicle and/or at the platform (an alternative for the tag to).
  • from: The origin of this route. Usually the first station.
  • operator: The company that runs this service.
  • color: If the line has a designated color then set this tag to it. It should be either a valid keyword (see [specification]), i.e. aqua, black, blue, fuchsia, gray, green, lime, maroon, navy, olive, purple, red, silver, teal, white or yellow. Or a RGB value, i.e. a # followed by six hexadecimal values.
  • name: If the route has a particular name, then add it here. Unlike ref, this is neither displayed anywhere nor needs it to fulfill any uniqueness properties.

List Additional tags

Additional tags can be added here. These tags might be of use for specific software or describe special local features but aren't part of the standard data format. If you leave a key empty or delete the key, the respective key will be removed from the relation.

Button Add a new Tag

This adds an empty line to the additional tags list.

Tab Itinerary

List of member ways

This list contains all the current members of the relation you are editing that are ways. The intended format of a route relation expects a continuous list of ways that represents the itinerary the vehicle takes in reality. Whenever two ways don't fit head on tail, a marker [gap] is put between the two corresponding entries in an extra line to make breaks clearly visible. This is not a member of the relation but just a marker. You can change the role of a way in the right column. Choose forward if the vehicle passes the way along the orientation of the way and backward if the vehicle passes the way against the orientation of the way. To properly display relations that don't follow the Oxmoa scheme, all other roles including the empty role are also displayed and you can choose despite forward and backward also an empty role.

Button Find

Detects entries whose corresponding objects are marked on the map. Mark one or more ways on the map. Then a click on Find marks every entry in the current relation that corresponds to a way currently marked on the map.

Button Show

This button changes the view on the map such that all ways belonging to a marked entry become visible. If no entry is marked, then the view will show all ways belonging to an entry.

Button Mark

This button marks all entries that are marked in the list as ways on the map and unmarks all other ways. It also copies a list of the marked entries to the plugin's internal clipboard, such that roles and the order can be reconstructed. If no entry is marked, then all objects belonging to an entry are marked and copied to the clipboard.

Button Add

This button adds all ways that are currently marked on the map as entries in the list. The entries are added in arbitrary order before the first marked entry. If no entry is marked, then the new entries will be appended. You can order the just added elements by marking them and clicking Sort.

Button Delete

This button deletes all currently marked entries.

Button Sort

If one or more entries are marked, all marked entries are sorted. I.e. their order and role is changed such that they form a continuous itinerary. If this is not possible, the plugin tries to construct long continuous sequences of sections. If no entries are marked, the entire list is sorted.

Button Reflect

If one or more entries are marked, their order is reflected and their roles get swapped between forward and <rm>backward, i.e. every entry is put after its successor. If no entry is marked, then the entire list will be reflected.


Tab Stops

List of member nodes

This list contains all the current members of the relation you are editing that are nodes. The intended format of a route relation expects a list of nodes that represents the stops in the order the bus takes them in reality. The roles can be changed to forward_stop or backward_stop but according to Oxmoa scheme, they should remain empty.

Button Find

Detects entries whose corresponding objects are marked on the map. Mark one or more nodes on the map. Then a click on Find marks every entry in the current relation that corresponds to a node currently marked on the map.

Button Show

This button changes the view on the map such that all nodes belonging to a marked entry become visible. If no entry is marked, then the view will show all nodes belonging to an entry.

Button Mark

This button marks all entries that are marked in the list as nodes on the map and unmarks all other nodes. It also copies a list of the marked entries to the plugin's internal clipboard, such that roles and the order can be reconstructed. If no entry is marked, then all objects belonging to an entry are marked and copied to the clipboard.

Button Add

This button adds all nodes that are currently marked on the map as entries in the list. The entries are added in arbitrary order before the first marked entry. If no entry is marked, then the new entries will be appended. You can order the just added elements by marking them and clicking Sort.

Button Delete

This button deletes all currently marked entries.

Button Sort

If one or more entries are marked, all marked entries are sorted. The sorting order depends on the itinerary, the settings for the distance limit and the orientation check box: the sorting algorithm attaches each stop to the nearest segment of the itinerary and then orders them in the order they are passed on the itinerary. Then all stops that can't be attached are added to the end of the list. If no entry is marked, all entries are sorted.

Button Reflect

If one or more entries are marked, their order is reflected. I.e. every entry is put after its successor.

Tab Meta

Check box Stops are possible

This check box controls the behaviour of the button Suggest stops and the button Sort in the tab Stops. If you mark only one of the boxes Right hand side or Left hand side, only stops on the respective side are taken into account. If you mark both boxes, stops on both sides are taken into account.

Text field Maximum distance from route

This text field also controls the behaviour of the button Suggest stops and the button Sort in the tab Stops. Only stops that have a distance less or equal the limit set here are taken into account.

Button Suggest Stops

This button replaces the current list of stops by a list of all stops that are close to the itinerary with regard to the setting of the check boxes and the text field described above.