NaPTAN/Import

From OpenStreetMap Wiki
Jump to: navigation, search

Requirements

The Department requires that the official identifier for each feature is also included in the imported data to allow the movement of these features to be tracked over time and for updates to potentially be added in the future.

The Department also requires that:

  • A trusted technical team (possibly consisting of one person) with OSM is identified
  • An import process will be designed by the team and agreed with the contact person at the DfT
  • The department will then release a copy of NaPTAN and NPTG to a nominated individual for the purpose of entering the agreed data into OSM in the agreed format.
  • On completion of the import the source datasets would be deleted.

Team

User:PeterIto I will make the introduction and will be happy to be on the team but am not offering to do the bulk of the technical work.

Ollie: I am interested in potentially helping out with this project and the import process.

Chillly: I would be pleased to help, especially if local help is needed for the Hull & East Yorkshire area. I can assist with some data preparation too.

Thomas Wood is willing to help out where required.

Xoff I am one of the mappers in Birmingham who have volunteered to provide a testbed for an NAPTAN import. I am willing to do some programming for this.

brianboru I'm willing to act as "project manager" to keep everything co-ordinated and willing to do comparison work between imported data and exisitng OSM data in the West Midlands

Ian13 is helping out with Bristol and South Gloucestershire

Donald Noble is importing data around Glasgow

Progress

  • A table of NaPTAN fields to OSM tags has been begun at NaPTAN/Tag mappings.
  • Local authority NaPTAN stop 'schemes' are being tracked at NaPTAN/Local schemes.
  • A conversion tool has been written (by Thomas Wood in Python: naptan2osm.
  • The West Midlands import used NaPTAN data as of 25th March 2009 19:47:46
  • The rest of the country will be imported from data downloaded and stored (privately) on the OSM dev server as of 1st August 2009 22:21:35
  • A trial import of Birmingham & now wider West Midlands area has been completed.
  • PlusBus zone polygons from NPTG imported and tagged as public_transport=pay_scale_area.

Using NaPTAN CSV Data

An alternative method to using Naptan2osm to process the NaPTAN XML data is outlined below.

  • Download CSV format data from data.gov.uk
  • Open in QGIS (or other GIS package) projecting to WGS84 using Latitude/Longitude fields
  • Select area of interest and export as CSV file
  • Open this trimmed CSV in OpenOffice/Excel and
    • rename columns to match OSM tag mappings, deleting extra columns and adding new columns for highway=bus_stop, name and ref as appropriate
    • note that there may be points that are not bus stops, and points for deleted bus stops, so an IF formulae can be used to only add bus_stop where the stop type is non-blank and status is act[ive]. Alternatively the data could be filtered and offending rows deleted
    • save modified CSV file
  • Open thus CSV file in JOSM after installing the OpenData plugin (and prerequisite plugins)

Merging NaPTAN nodes with existing data

Where OSMers have previously gathered bus stop data, we may find that this is more accurate than NaPTAN data, or it may be less accurate. In any case we need to fix the duplication. In some places mappers have put the nodes in route relations. Meanwhile NaPTAN data includes a lot of extra tags. We want to merge the two datasets to arrive at a situation where we have the best of both! Merging node data will be a manual process. We also want to carry out follow-up surveying work to improve the accuracy going forwards. The procedures and tools for this are described on NaPTAN/Surveying and Merging NaPTAN and OSM data

Sponsorship

This work is supported in this work by Ideas in Transit which is a five year research project funded by the UK Government looking examining "what happens when people and the power of the crowd come together with technology to address the transport challenges faced by individuals and society". ITO World are part of the research partnership which also supported the development of OSM Mapper.

Rights to NaPTAN data

For the record, contents of an email on Talk-Transit on 12 March 2009 on behalf of the Department of Transport [1]:

I understand that it would now be appropriate for me to confirm that a fresh download of NaPTAN data can be made from the national database. This is in accordance with the offer that Traveline has made (in conjunction with Department for Transport) to make this data available to OSM. It would be sensible, I suggest, that a complete set of files for national coverage are taken in the same download even if it is intended to import data on an area by area basis.
I would expect to make occasional updates of this data available from time to time - but I sense that more work needs to be done (after the initial upload has worked successfully) to be able to use fresh downloads to update the data in the future. We can discuss this over the coming weeks or months as more experience of the process has been gained.
I will continue to monitor this, the talk-transit, list and will contribute advice from time to time as appropriate - but I am well aware that there are others with detailed knowledge and experience of working with NaPTAN data who will be able to answer many of the practical questions that will arise in the process of using the data for real. I wish the community well in using the data - I hope it proves to be a useful contribution to the development of OSM in Great Britain.
I am conscious that some concern has been expressed about whether OS has any rights to the NaPTAN data (or NPTG) - and I can assure the OSM community that the Department for Transport has been assured by Ordnance Survey that they do not claim any rights over NaPTAN location data - and it is a matter of record that Department for Transport is the owner of the NPTG database. Both NaPTAN and NPTG are maintained by DfT as national databases, collating data from all local transport authorities in England, Wales and Scotland.
Best wishes
Roger Slevin
Standards Manager, Transport Direct Team, Department for Transport