-
Notifications
You must be signed in to change notification settings - Fork 0
NaPTAN
In Great Britain, NaPTAN (the National Public Transport Access Nodes dataset) lists almost every bus and tram stop with an official name, code and position. Relatify cross-references it against what's in OSM so you can spot stops that are missing, under-tagged, or mapped in a place NaPTAN disagrees with - without leaving the editor.
This is a Great Britain only feature and is on by default. Set NAPTAN_ENABLED=0
in .env to turn it off entirely (useful outside GB, where the dataset has no
coverage).
On startup the server downloads the national NaPTAN dataset - about 100 MB - in the
background, and again once a day after that, into the directory set by
NAPTAN_DATA_DIR (data/ by default). Suggestions only start appearing once that
first download has finished, so on a fresh install give it a minute before expecting
to see anything.
Only stops with a fixed pole are used: hail-and-ride, flexible and unmarked stops are left out, since there's nowhere on the map to put them.
Stops that are in NaPTAN but not in OSM show up near the route as grey markers with a dashed ring. Click one to open its form:
The form is pre-filled from the NaPTAN record:
- Name - the NaPTAN common name.
- Local ref - filled in when the NaPTAN indicator is a stop letter or stand number (e.g. "opp" isn't one, but "Stop M5" is).
- The full set of tags the upload will write is under All tags:
ref(derived from the NaPTAN code, following the wiki's tag mappings),naptan:AtcoCode,naptan:NaptanCode,naptan:CommonName,naptan:Indicator,naptan:Street,naptan:Bearing, andnaptan:verified=noto mark the stop as taken from NaPTAN rather than surveyed on the ground.highway=bus_stop,public_transport=platformandbus=yesare added on upload too, same as any new stop.
From there it behaves like any new stop (see Adding bus stops
below): it gets a yellow glow, can be dragged or deleted before upload, and the
changeset it's added in gets source=NaPTAN.
NaPTAN's coordinates are often tens of metres off the real pole, so drag the stop to where the pole actually is before uploading. Stops are added one at a time on purpose - adding them in bulk from the dataset would be an import, which needs agreeing with the OSM community first.
A NaPTAN stop counts as already mapped when an OSM stop carries its naptan:AtcoCode,
or has a similar name within 80 m of it. Each OSM stop only accounts for one NaPTAN
record, so a stop that's missing is still shown even if its namesake across the road
is already mapped. Where both records have a local_ref it must match too, so a
missing "Stop M5" isn't hidden by an already-mapped "Stop M3". A code NaPTAN no longer
lists is ignored, and one OSM stop can cover two NaPTAN records that share a letter, as
occasionally happens in the source data.
A stop the route serves that's missing from OSM doesn't have to come from NaPTAN - right-click anywhere on a bus or trolleybus route and choose to add a stop there directly:
Fill in Name (required - the map data leaves out unnamed platforms, so an unnamed one would vanish next time the route loads) and optionally Local ref, Shelter and Bench. Put the marker on the side of the road the bus actually stops on, since that's what the route calculation uses to decide which direction the stop serves.
New stops get a yellow glow. Drag one to reposition it, or click it again to edit or delete it before upload. If another stop is within 50 m, the form warns you, since the two are most likely the same stop under two names.
The upload creates each stop as a node tagged highway=bus_stop,
public_transport=platform and bus=yes (or trolleybus=yes), in the same changeset
as the rest of the route, and adds it to the relation. Overpass lags OSM by a few
minutes, so a stop you just uploaded may not reappear immediately if you reload the
page straight after.
For putting a stop_position node on the road for one of these stops, see
Stop Location & Area.
Right-click any stop and choose Tags to see everything it carries - not just the handful the editor surfaces. Where a stop has both a platform and a stop position, each is listed separately under its own element id. This list is read-only; to change tags on a stop already in OSM, use Add NaPTAN tags below.
If a stop is already mapped but NaPTAN has more tags for it than OSM does, its tooltip says so and its right-click menu gets a NaPTAN tags button, alongside Tags and Inspect (and Stop area, covered on the Stop Location & Area page):
Only ref, local_ref and the naptan:* tags are ever offered this way - never
name or naptan:verified - and only the ones the stop is actually missing. Clicking
the button shows exactly what would be added; confirm and the stop glows blue until
you upload. The same button removes the pending addition again if you change your
mind.
Tags are only offered where the match to a NaPTAN record is certain: the stop's own
naptan:AtcoCode, or a similar name with nothing else competing for the pairing, or a
matching local_ref. On upload each stop is fetched again - a tag it's gained since is
skipped, and one that's been given a different value stops the upload as a conflict
rather than overwriting it. Adding tags counts as a change on its own, so it can be
uploaded even when the route itself hasn't changed.
Two low-severity warnings use NaPTAN data; neither blocks uploading:
-
Some stops are inactive in NaPTAN - stops on the route whose
naptan:AtcoCodeNaPTAN has marked inactive, usually meaning the stop was taken out of use. Skipped entirely whenNAPTAN_ENABLED=0. -
Some stops serve the other direction - compares a stop's
naptan:Bearingagainst the direction the route actually passes it, which catches the stop across the road having been picked by mistake. This one only reads the tag already on the stop, so it works even without the NaPTAN download.
Filling in tags (above) only ever adds what a stop is missing. Where the stop and NaPTAN hold different values for the same tag - a renamed stop, a changed indicator or bearing - that's a judgement call, so the editor puts it in front of you instead of guessing.
Such a stop glows red, and its right-click menu has NaPTAN differs, listing every disputed tag with both values side by side:
Pick whichever value is correct for each tag. Taking NaPTAN's value writes it on upload, replacing what's there; keeping the stop's own value changes nothing in OSM, it just records that you looked at it. The list stays open as you work through a stop's disagreements, counting down what's left, so several at once can be settled in one sitting - close it when you're done, and you can change an answer any time before uploading.
name shows up here even though it's never filled in automatically, since a renamed
stop is the disagreement most worth catching. On upload, each tag you chose to replace
is checked against the value you were shown when you decided; if it's changed since,
the upload stops as a conflict instead of overwriting someone else's edit. If the
NaPTAN record itself changes later, you're asked again.
Until every disagreement on a stop the route actually calls at has been decided, the route can't be uploaded - the submit button stays hidden behind a warning, the same as any other high-severity problem. Stops the route doesn't call at are left alone, since you're not editing them.
NaPTAN data may be incorrect. Values such as street name are often entered incorrectly into NaPTAN, and if spellings are slightly different, it is usually best to leave them and check in person or a reputable source.