# Public Transport Line Diagram

## Quick Access

### By network and line number

Network:
The value of the tag network of the relation(s) to consider. A working example is VRR for the German Verkehrsverbund Rhein-Ruhr.
Line number:
The value of the tag ref of the relation(s) to consider. A working example is 625.
Operator:
Usually, you can leave this field empty. Only if the combination of Network and Line Number is not unique, you can use this to make your query more precise.

You can access this service directly with an URL of the form
http://78.46.81.38/api/sketch-line?network=network&ref=ref

## Full Access

### A form with all possible parameters

Network:
The value of the tag network of the relation(s) to consider. A working example is VRR for the German Verkehrsverbund Rhein-Ruhr.
Line number:
The value of the tag ref of the relation(s) to consider. A working example is 625.
Operator:
Usually, you can leave this field empty. Only if the combination of Network and Line Number is not unique, you can use this to make your query more precise.
Correspondences:
A nonempty value in this field enables the display of correspondences. This slows down the response times but gives more information. The value is interpreted as maximum acceptable distance in meters between two stations or bus stops to still be acceptable for changing vehicles. The default value is 100.
Width:
The width of the generated SVG in pixels. Default is 700.
Height:
The heigth of the generated SVG in pixels. Default is 495.
Font size of stop names:
The font size in pixels for the stopname in the generated SVG. Default is is empty field. This means that the generator takes font size 10 for lines displayed in two rows and font size 16 for lines displayd in one row.
Force number of rows:
This field can have values 1 or 2 or can be empty. If it is empty, the generator chooses whether to display the line in one or two rows. If it is set to 1 resp. 2, the generator displays the line in an case in one resp. two rows.
Maximum correspondences per row:
The limit for the acceptable number of line numbers to be printed per line. This option is only effective when correspondences are enabled. Its default value is 6.
Maximum correspondences below:
The limit for the acceptable number of line numbers to be printed below the line bar. This option is only effective when correspondences are enabled. Its default value is 0.
Style:
This parameter makes the generator using an existing style for formatting the diagram. A working example is wuppertal for a style with German translations and abbreviations.

### Using style files

These style files allow to maintain a set of preferences. For example, an url like
http://78.46.81.38/api/sketch-line?style=wuppertal&network=network&ref=line number
will show you a diagram with German abbrevations, while http://78.46.81.38/api/sketch-line?style=padua&network=network&ref=line number
would have Italian abbrevations. To edit the styles, type wuppertal or padua in the above box an click the button.

### Opening hours

For the times of the week when the bus service is operational, the generator uses the tag <emph>opening_hours</emph>. These times manifest themselves in two ways:

- For every line which has operation times set, a text line <emph>operates ...</emph> is added below the line number.
- Connections are only shown between services that operate at a common time. I.e. a night bus doesn't appear on the list of correspondences for a service running only over the day.

The accepted format for <emph>opening_hours</emph> is as follows: Different entries are separated by colons. An entry consists of either a day (one of <emph>Mo</emph>, <emph>Tu</emph>, <emph>We</emph>, <emph>Th</emph>, <emph>Fr</emph>, <emph>Sa</emph> or <emph>Su</emph>) or a range of days (e.g. <emph>Mo-Fr</emph>), a blank and then a range of times in the format <emph>hh:mm-hh:mm</emph>. Times may not surpass midnight and day ranges may not surpass sunday. The timespans are considered additve. Some eaxmples:

- <emph>Mo-Fr 06:00-20:00</emph>: The service runs from monday to friday from 06h00 to 20h00.
- <emph>Mo-Su 06:00-20:00</emph>: The service runs daily from 06h00 to 20h00.
- <emph>Mo-Fr 00:00-24:00</emph>: The service runs 24 hours from monday to friday but not on the weekend.
- <emph>Mo-Su 21:00-24:00, 00:00-00:30; Su 07:00-10:00</emph>The service runs every evening from 21:00 to half past midnight and also on sunday mornings. Note that the timespan 21:00-00:30 has to be split.
- <emph>Mo-Fr 09:00-12:00, 15:00-18:00; We 09:00-12:00</emph>: This is the same as <emph>Mo-Fr 09:00-12:00, 15:00-18:00</emph>, because the wednesday is contained in <emph>Mo-Fr</emph>.
- <emph>Mo-Fr 09:00-12:00; Mo-Tu 15:00-18:00; Th-Fr 15:00-18:00</emph>. This service is not operational on wednesday afternoons.

# Public Transport Line Map

## Access By network and line number

Network:
The value of the tag network of the relation(s) to consider. A working example is VRR for the German Verkehrsverbund Rhein-Ruhr.
Line number:
The value of the tag ref of the relation(s) to consider. A working example is 625.
Scale:
The scale in meter per pixel. Bigger values mean smaller maps. A useful scale for bus services is 10.0. For train services, 25.0 or bigger may suit better.
Pivot meridian:
The used projection is Sinusoidal, and this is the central meridian for this projection. If you leave the field empty, the algorithm will detect a suitable value on its own.
Font size of stop names:
The font size in pixels for the stopname in the generated SVG.

You can access this service directly with an URL of the form
http://78.46.81.38/api/draw-line?network=network&ref=ref