Help:Semantic features

From Transit.Wiki
Jump to: navigation, search

This wiki heavily relies on Semantic MediaWiki, which does the following:

  • Provide annotation of the data like route numbers, destination, and rail connections)
  • Provide dynamic queries. Instead of typing the routes serving the station or a destination individually. Semantic MediaWiki allows queries that generate results dynamically, so that information can only be entered once.

For example, this code generate a list of buses serving Tamien Station:

{{#ask: [[Place::Tamien Station]]
| format=template| template=listlines2| link=none | ?rnum=| ?rlet=| ?to=

This is the results:

Weekend only: Tamien - San Jose
Alum Rock Station - De Anza College via Valley Med
Westgate - Downtown San Jose


Annotating is simple:

[[Place::Embarcadero Station]]

This would create a link and an annotation, which through the queries, will generate that a list of pages that have such annotation.

Annotation is available for various items. Some of the annotations are made when using certain templates.

Common properties

For transit lines

rnum - Transit route numbers (no letters allowed). This allows the numbers to be sorted properly (like 9 before 11). It is automatically annotated using the template:routeinfo.

rlet - Transit letters or words. This property is for transit line that use names (XXX Shuttle), color (Green Line), or Letter (A). If the route has a number and a letter (1R), then rnum would be 1 and rlet would be R. It is automatically annotated using the template:routeinfo.

to - This is for the short description of the route. Like XXX - YYY. Other information like service type (e.g. express), days of operation (for those that run two days a week) can be placed as well. It is automatically annotated using the template:routeinfo.

place - This is to show the points of interest and transit stops served by this route. If the transit line stops within 1000 to 2000 feet with downtowns, shopping centers, hospitals, schools, colleges, etc, that location should be annotated in the transit line page in this fashion.

* [[Place::Stanford University]]
* [[Place::Stanford Shopping Center]]
* [[Place::Downtown Palo Alto]]
* [[Place::East Palo Alto Government Center]]
* [[Place::VA Menlo Park]]
* [[Place::Stanford Menlo Park]]
* [[Place::Menlo Atherton High School]]

Rail and bus transit centers now all use "Place" as property.

* [[Place::Van Ness Station]]
* [[Place::Arleta Station]]
* [[Place::Sunnydale Station]]

How would one know where the points of interest are? They're located in a number of custom KML files. To add points of interest, simply open up the KML files on Google Maps, open up the markers, highlight the text, and drag it to the edit box.

busway - This is to show the bus way stops served by the transit route. Only those that operate on the busway use busway. Others that stop at the station but outside the busway use place.

provider - This is to show the company or agency that operate the service. It is automatically included if you use template:bottom nav for typical transit agencies. For those that are single route operation, use:

[[Provider::Self| ]]

See Sample bus page for starter code. Simply copy the starter code and start plug in the rest of the information.

For locations

The most important template for location pages is template:place, which provides annotations of city and the coordinates.

By stop - This property is to show the nearest rail stop to the destination.

* [[By stop::Paseo de San Antonio Station]]

The rest of the page for locations is to show the bus lines serving the location via a query. There's no need (and shouldn't) to type in the routes individually. If you see a route missing in your location that should be there, go to that route page and add a place to your location.

There are two codes for the query:

{{#ask: [[Place::{{PAGENAME}}]]
| format=template| template=listlines2| link=none| ?rnum=| ?rlet=| ?to=| sort=rnum,rlet

Above code is for locations that are served by a single agency. The agency name will not be shown.

{{#ask: [[Place::{{PAGENAME}}]]
| format=template| template=listlines4| link=none| ?to=| sort=provider,rnum,rlet 

Above code is for locations served by multiple agencies. The agencies name will be shown.

It is possible to have two queries for a single location. Like a list for all local routes operated by a single agency, and another for all others. (See Downtown Sacramento for example.) To do so, use provider to filter the main agencies and the rest.