Tenerife Bus Transport Import
Goal
Regular public urban and interurban bus services in Tenerife island are operated mainly by Transportes Interurbanos de Tenerife (TITSA), a public limited company that belongs to the Cabildo Insular de Tenerife (Tenerife Island Council). Our goal is to incorporate the information of bus stops and routes operated by TITSA to OSM.
Schedule
The project consists of two phases:
- Bus stops import. On approval by the imports list, this phase is expected to begin in March and will run for about two weeks (or less depending on the number of participants enrolled).
- Routes import. This phase starts after completing the previous one and it will need another announcement in the list. The expected duration is one month.
Import Data
Background
Data source site: http://www.titsa.com
Data license: http://www.titsa.com/index.php?accion=avisolegal
Link to permission: https://lists.openstreetmap.org/pipermail/talk-es/2013-February/011341.html
OSM attribution: Will be given in dataset tags and dedicated user account: titsa-import.
ODbL Compliance verified: Yes
Permission
Information about specific bus stops or routes could be consulted in the "Our services" section of the website under the following copyright notice (extract translated from spanish). It don't offers the possibility of downloading the entire data set.
"Reproduction is authorized provided the source is acknowledged, except if otherwise indicated. In cases where prior authorization is required for reproduction or use of textual and multimedia information (sound, images, software, etc..), Such permission shall cancel the abovementioned general permission and indicate clearly any restrictions on use."
When asked with their contact web form for permision to use their data with a letter based on this model, TITSA answers positively, forwarding us to the Technical Staff to obtain the data. This department is being fully cooperative, sending us the data.
Data description
Dataset in GTFS format with:
- 3653 bus stops with the following attributes: id, code (code==id), name, latitude, longitude.
- 166 routes with id, short name and long name.
- Data about trips and stop times allows to derive the routes belonging to a service with all its variations and complete timetable information.
Data are expected to be up-to-date, at least, to may 2012. A review of the positions of some stops against high resolution aerial imagery allow to estimate an accuracy of about 50 m, being generally better OSM.
Import Type
This is a one-time import, but it will require periodic reviews to keep information up-to-date. The expected software tools to be used are GO-Sync for bus stops and own Python code for routes. Josm will be used for checking, validation, upload and revert changesets if needed.
Data Preparation
Data Reduction & Simplification
The bus stops data to import is simple enough and don't need any reduction plan. Regarding routes we will incorporate all directions and variants for a service. To differentiate the variants will include timetable in a operating_hours tag.
Tagging Plans
Public transport schema 2 will be used for tagging. This is the map between source attributes and OSM tags.
Bus stops
File | GTFS attribute | OSM tag |
---|---|---|
stops.txt | stop_id | ref=* |
stops.txt | stop_name | name=* |
highway=bus_stop | ||
public_transport=platform | ||
bus=yes | ||
route_ref=* | ||
operator=TITSA |
Routes
File | GTFS attribute | OSM tag |
---|---|---|
routes.txt | route_id | gtfs_id=* |
routes.txt | route_short_name | ref=* |
routes.txt | route_long_name | name=* |
* | * | operating_hours=* |
type=route | ||
route=bus | ||
colour=#79b51d | ||
operator=TITSA |
The operating_hours tag would be similar to opening_hours=*, for example:
operating_hours= Mo-Su 07:35
Or even:
operating_hours=Mo-Su 14:05,18:00,19:05,20:00; Sa 13:05,20:50; Mo-Fr 20:55; Sa-Su 12:00; Su 09:00,09:45,15:00,16:00
Services
File | GTFS attribute | OSM tag |
---|---|---|
routes.txt | route_id | gtfs_id=* |
routes.txt | route_short_name | ref=* |
routes.txt | route_long_name | name=* |
description=* | ||
network=* | ||
type=route_master | ||
route_master=bus | ||
colour=#79b51d | ||
operator=TITSA |
Network tag values will be one or many of this: urban; metropolitan; touristic; express.
Changeset Tags
We will use the following changeset tags.
- comment=*
- created_by=JOSM/version
- source=TITSA
- type=import
- url=https://wiki.openstreetmap.org/wiki/Tenerife_Bus_Transport_Import
Data Transformation
For bus stops a tweaked version of GO-Sync will be used to transform GTFS data to OSM XML. Own Python code will generate routes and services. Link to code.
Data Transformation Results
This is an example of bus stops with a small fragment of the dataset.
- OSM_UPLOAD_before.osm. Transformed to OSM with GO_Sync.
- OSM_UPLOAD_after.osm. The result after human revision with GO_Sync.
- OSM_UPLOAD_final.osm. Final data to upload after a second revision with Josm.
And two routes.
This files only contains relations.
Data Merge Workflow
Team Approach
The team is formed at this moment by Javiersanp, tiger, jsaga, migoga and g0ldfish. It's needed help from the community to do the job. Please, send me a message if you want to colaborate.
Javiersanp is the main promoter of the import but it's needed help from the community to perform the work. Please send me a message if you want to colaborate.
This import was announced in Talk-es list. Most active and last edit public transport mappers in the area have been contacted also.
References
This import was announced in Talk-es and imports list.
Workflow
Bus stops
- Each colaborator will receive a chunk of the GTFS dataset.
- Using GO_Sync he conflates it with OSM data and sends the resulting file to a peer.
- The peer opens the file with Josm and checks each node reviewing decissions. Aditionally, availables high resolution imagery (Ortofotos_de_Grafcan#OrtoExpress_Urbana / PNOA) should be used to refine positions and detect shelters.
- Finally he validates and uploads the data.
Group | Zone | 1st revision w/GO_Sync | 2nd revision w/Josm | Changeset |
---|---|---|---|---|
1 | Sureste | Javier Sanchez | migoga | 15293602 (a, l) |
2 | Suroeste | migoga | Javier Sanchez | 15346872 (a, l) |
3 | Noroeste | jsaga | tiger | 15415172 (a, l) |
4 | Noreste | jsaga | g0ldfish | 15567282 (a, l) |
Routes
- Each colaborator will receive some OSM XML files with all the routes and checks them for global errors.
- Routes will be conflated with existing ones preserving the relation history.
- All routes will be uploaded by titsa-import user in order to give appropiate credit.
- Each colaborator selects some routes and reserves them by adding his user id to the notes column of the Bus Routes in Tenerife page.
- The colaborator downloads the relations of the selected routes and adds to them the ways that follow the routes (originally they includes only platforms). This data are uploaded with his own user account.
- When finished each route, the collaborator deletes its name from the route's row in the Bus Routes in Tenerife page.
Because the amount of data to import isn't too big, the changeset size isn't a concern. If any thing goes wrong, JOSM/Plugins/Reverter will be used to revert the changeset.
Conflation
Bus stops
OSM have 1480 nodes with highway=bus_stop tag in the import area. TITSA dataset have 3653 bus stops. GO_Sync will help the user to detect duplicates and merge them. The software downloads bus_stop nodes in the import area, compares each GTFS stop with OSM ones into a radius of 100 meters and matches it by its gtfs_id attribute. Each GTFS stop get assigned into one of this four categories for human revision using a tags table and a map view.
- 1246 new GTFS stops with potential matches in OSM. There exist one or more OSM stops that could be candidate to be a duplicate. The user must detects it (if it exists) and merges the tags.
- 2018 new GTFS stops with no OSM matches. No particular action to do.
- 389 existing stops with updates. Check names conflicts.
- 0 existing stops.
Tags merging
Tag | Default selected value | Note |
---|---|---|
lat, lon | OSM | Usually better positioned |
route_ref | TITSA | Better because there was major changes in the network recently |
name | TITSA | They should be similar. It needs checking. |
Regarding the ref tag, if nodes are near but the stop codes are different, most probably they aren't the same stop. Except if codes are so similar that a mapper mistake is suspected.
Routes
Considering one route for each direction, the TITSA dataset will produce 166 route_master=bus relations and about 332 route=bus relations. Currently there exists 19 route=bus relations and one route_master=bus relation in the import area. This amount could be conflated manually.
Quality Assurance
Each OSM file will be revised using Josm by a peer before upload it. Availables high resolution imagery (Ortofotos_de_Grafcan#OrtoExpress_Urbana / PNOA) should be used to refine bus stop positions.