eastein / metraapi

A Python library that makes it easy to find Lines, Stations, and Realtime arrival times for the Chicago Metra.
MIT License
1 stars 1 forks source link

Add GPS coordinates and street addresses for stations to API #3

Open eastein opened 8 years ago

eastein commented 8 years ago

Street addresses are available here: https://data.cityofchicago.org/Transportation/Metra-Stations/nqm8-q2ym

The DBF file can be turned into JSON using https://github.com/eastein/dbf2json.

The street addresses may be partially convertible into GPS coordinates by matching up with datasets from http://openaddresses.io/.

It may also be possible to get this data from OpenStreetMap via http://wiki.openstreetmap.org/wiki/Overpass_API/Overpass_QL#Block_statements which can be used with http://overpass-turbo.eu/ to query.

A decent starting point query I've got so far is:

(node[operator="Metra"])->.metra;node.metra[railway="station"]({{bbox}});out;

However, it seems to not find the UP-NW line entries. The problem is that the railway tag isn't being set nor is operator.

What is being set is:

name (which we do want) and public_transport=stop_position. The attributes we can otherwise find on Nodes are instead on the Way which is made up of nodes.

eastein commented 8 years ago

Note - may find useful data here http://www.rtams.org/rtams/home.jsp

eastein commented 8 years ago

Relevant links from OpenStreetMap:

http://wiki.openstreetmap.org/wiki/Public_transport#Railways http://taginfo.osm.org/keys/railway