NOTICE: help.openstreetmap.org is no longer in use from 1st March 2024. Please use the OpenStreetMap Community Forum

Hi,

I have a large set of XML files following the TransXchange data standard. I have created a parser to extract bus stops a bus will run through when making a specific journey. These bus stops are identified by an 'ATCO Code'. Below is an example of an ATCO Code.

43000804705

Are there any resources OpenStreetMap has that will help me convert this code into a set of coordinates? If not and anyone has any ideas as to how I can do this I would really appreciate it. I have about 60 codes to convert and will have many more in the near future so ideally I need something that is fast and easy to use.

asked 23 Sep '13, 20:55

jskidd3's gravatar image

jskidd3
46225
accept rate: 0%


The ATCO code is an identifier for bus stops in the NaPTAN database, which has been imported into OSM in parts of the UK. You can search OSM for bus stops with the naptan:AtcoCode tag key that you want, otherwise it should be possible to find the stop in NaPTAN itself.

permanent link

answered 23 Sep '13, 21:26

Wynndale's gravatar image

Wynndale
5651515
accept rate: 7%

edited 24 Sep '13, 07:28

Thanks for your answer. Would you be able to give me an example of how I can search OSM for the data? I'd really appreciate that as I'm pretty new to it. Ideally I'd need some sort of URL where I can pass the AtcoCode as a parameter? Thanks again

(23 Sep '13, 21:28) jskidd3
1

A good place to start is http://overpass-turbo.eu .

Try choosing where you are interested in on the map view and edit the script on the left to say: <query type="node"> <has-kv k="naptan:AtcoCode" v="43000804705"/>

and so on.

(23 Sep '13, 21:38) Wynndale
1

If you know where the bus stops are you can use the Export data link on the left of the map to get an XML extract of the OSM database including coordinates and ATCO codes of bus stops.

(23 Sep '13, 21:45) Wynndale

Not OSM data, but you might want to look at the NaPTAN data. Some of this was imported as a trial into OpenStreetMap and where that has been done the stops may have a naptan:AtcoCode tag, such as this one. Where the data has been verified the position is likely to be more accurate than the original NaPTAN data, though their data may well have been updated since the original data was made available and the trial imports were done.

The NaPTAN data states precision of: "+/- 1 metre spatial accuracy of Ordnance Survey Grid Reference" so you may need to convert the grid reference to lat/lon (and then perhaps to WGS84 or whatever you need).

permanent link

answered 23 Sep '13, 21:31

EdLoach's gravatar image

EdLoach ♦
19.5k16156280
accept rate: 22%

automatic coordinate conversion can be done using the excellent proj4 library. There are a lot of proj4 bindings for different languages.

(24 Sep '13, 10:13) gormo
Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Question tags:

×144
×84
×39
×1
×1

question asked: 23 Sep '13, 20:55

question was seen: 10,081 times

last updated: 24 Sep '13, 10:13

NOTICE: help.openstreetmap.org is no longer in use from 1st March 2024. Please use the OpenStreetMap Community Forum