Difference between revisions of "Help:Semantic features"

From Transit.Wiki
m
m
 
Line 6: Line 6:
 
For example, this code generate a list of buses serving [[Tamien Station]]:
 
For example, this code generate a list of buses serving [[Tamien Station]]:
 
<pre>
 
<pre>
{{#ask: [[Rail::Tamien Station]] [[Category:buses]]
+
{{#ask: [[Place::Tamien Station]]
 
| format=template| template=listlines2| link=none | ?rnum=| ?rlet=| ?to=
 
| format=template| template=listlines2| link=none | ?rnum=| ?rlet=| ?to=
 
}}
 
}}
Line 12: Line 12:
  
 
This is the results:
 
This is the results:
{{#ask: [[Rail::Tamien Station]] [[Category:buses]]
+
{{#ask: [[Place::Tamien Station]]
 
| format=template| template=listlines2| link=none | ?rnum=| ?rlet=| ?to=
 
| format=template| template=listlines2| link=none | ?rnum=| ?rlet=| ?to=
 
}}
 
}}
Line 19: Line 19:
 
Annotating is simple:
 
Annotating is simple:
 
<pre>
 
<pre>
[[Rail::Embarcadero Station]]
+
[[Place::Embarcadero Station]]
 
</pre>
 
</pre>
  
Line 34: Line 34:
 
'''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]].
 
'''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''' - 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.
  
 
<pre>
 
<pre>
Line 46: Line 46:
 
</pre>
 
</pre>
  
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 and bus transit centers now all use "Place" as property.
 
 
* [http://maps.google.com/maps?f=q&source=s_q&hl=en&geocode=&q=http:%2F%2Fmaps.google.com%2Fmaps%2Fms%3Fie%3DUTF8%26hl%3Den%26vps%3D2%26jsv%3D337a%26msa%3D0%26output%3Dnl%26msid%3D213832994774185878714.00049cb559fbe817f4568&aq=&sll=37.215155,-121.858832&sspn=0.589472,0.770416&ie=UTF8&ll=37.378888,-121.569214&spn=1.222212,2.469177&z=9 SF West Bay markers]
 
 
 
'''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.
 
 
 
 
<pre>
 
<pre>
* [[Rail::Van Ness Station]]
+
* [[Place::Van Ness Station]]
* [[Rail::Arleta Station]]
+
* [[Place::Arleta Station]]
* [[Rail::Sunnydale Station]]
+
* [[Place::Sunnydale Station]]
 
</pre>
 
</pre>
  
'''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.
+
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 ''bus''.
+
* [http://maps.google.com/maps?f=q&source=s_q&hl=en&geocode=&q=http:%2F%2Fmaps.google.com%2Fmaps%2Fms%3Fie%3DUTF8%26hl%3Den%26vps%3D2%26jsv%3D337a%26msa%3D0%26output%3Dnl%26msid%3D213832994774185878714.00049cb559fbe817f4568&aq=&sll=37.215155,-121.858832&sspn=0.589472,0.770416&ie=UTF8&ll=37.378888,-121.569214&spn=1.222212,2.469177&z=9 SF West Bay markers]
  
Note: Connection to ferry terminals use ''Place''.
+
'''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''' - 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:
Line 92: Line 87:
  
 
<pre>
 
<pre>
{{#ask: [[Place::{{PAGENAME}}]] [[Category:buses]]
+
{{#ask: [[Place::{{PAGENAME}}]]
| format=template| template=listlines| ?to=| sort=provider,rnum,rlet
+
| format=template| template=listlines4| link=none| ?to=| sort=provider,rnum,rlet  
 
}}
 
}}
 
</pre>
 
</pre>

Latest revision as of 18:52, 24 December 2013

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:

Alum Rock Station - De Anza College via Valley Med
Lockheed Martin - Monterey & Old Tully
Willow Glen Ed Park - 1st & Keyes

Annotating

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.