Help:Semantic features

From Transit.Wiki
Revision as of 16:39, 4 May 2011 by Andy (talk | contribs)

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: [[Rail::Tamien Station]] [[Category:buses]]
| format=template| template=listlines2| link=none | ?rnum=| ?rlet=| ?to=
}}

This is the results:


Annotating

Annotating is simple:

[[Rail::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 served by the transit 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]]

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.

rail - This is to show the rail connections served by the transit route. If the transit line stops within 500 feet of a light rail, commuter rail, or a rapid transit stop, that location should be annotated in the transit line page in this fashion.

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

bus - This is to show the bus transit centers (standalone and not those located at shopping malls, colleges, or rail stations) served by the transit route.

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 bus.

Note: Connection to ferry terminals 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}}]] [[Category:buses]]
| format=template| template=listlines| ?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.