Skip to content

Instantly share code, notes, and snippets.

View eoghanmurray's full-sized avatar

Eoghan Murray eoghanmurray

View GitHub Profile
<?xml version='1.0' encoding='UTF-8'?>
<osm version="0.6" generator="osmconvert 0.7T" timestamp="2016-05-30T19:44:05Z">
<bounds minlat="48.79409" minlon="-9.667832" maxlat="61.92858" maxlon="2.25"/>
<node id="33847396" lat="55.9328844" lon="-3.215253" version="3" timestamp="2015-01-24T18:33:41Z" changeset="28379428" uid="388774" user="drnoble"/>
<node id="33847399" lat="55.9329578" lon="-3.2150655" version="3" timestamp="2015-01-24T18:33:41Z" changeset="28379428" uid="388774" user="drnoble"/>
<node id="33847401" lat="55.9331153" lon="-3.2152619" version="3" timestamp="2015-01-24T18:33:41Z" changeset="28379428" uid="388774" user="drnoble"/>
<node id="33847405" lat="55.9333842" lon="-3.2145749" version="3" timestamp="2015-01-24T18:33:41Z" changeset="28379428" uid="388774" user="drnoble"/>
<node id="33847407" lat="55.933535" lon="-3.2147631" version="3" timestamp="2015-01-24T18:33:41Z" changeset="28379428" uid="388774" user="drnoble"/>
<node id="33847409" lat="55.9336135" lon="-3.2145625" version="3" time
name | osm_id | osm_way_id | tags
-----------------------------+------------+------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Station Name | node_id | station_way_id
-----------------------------+------------+------------
Acklington | 3122470853 |
Acklington | 20915833 |
Airbles | 30562471 |
Airbles | 2977094542 |
Airdrie | 2978794033 |
Airdrie | 30617723 |
Aldgate East | 1741698385 |
Aldgate East | 1825191028 |
class MutableList(Mutable, list):
@classmethod
def coerce(cls, key, value):
"Convert plain dictionaries to MutableDict."
if not isinstance(value, MutableList):
if isinstance(value, list):
return MutableList(value)
# this call will raise ValueError
return Mutable.coerce(key, value)
else:
fd = Feed(local_gtfs_zip)
try:
fd.read_table('frequencies.txt')
except (KeyError, IOError) as e:
pass
else:
raise Exception('need to handle frequency based schedules')
trips_by_route = defaultdict(list)