diff --git a/_data/gpx/beacon-i90-bridge-cap-hill.gpx b/_data/gpx/beacon-i90-bridge-cap-hill.gpx new file mode 100644 index 0000000..58ec2f7 --- /dev/null +++ b/_data/gpx/beacon-i90-bridge-cap-hill.gpx @@ -0,0 +1,487 @@ + + + + beacon-i90-bridge-cap-hill + Beacon Hill, I90 Bridge, Cap Hill + 10.1 + 1190 + Beacon Hill Station + Capitol Hill Station + P2P + https://onthegomap.com/s/kps8bd3u + Race Condition Running + + Race Condition Running + + + + 10.06 mi route + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/_data/gpx/beacon-i90-trail-cap-hill.gpx b/_data/gpx/beacon-i90-trail-cap-hill.gpx new file mode 100644 index 0000000..2946b60 --- /dev/null +++ b/_data/gpx/beacon-i90-trail-cap-hill.gpx @@ -0,0 +1,355 @@ + + + + beacon-i90-trail-cap-hill + Beacon Hill, I90 Trail, Cap Hill + 4.8 + 530 + Beacon Hill Station + Capitol Hill Station + P2P + https://onthegomap.com/s/8jo5uqcm + Race Condition Running + + Race Condition Running + + + + 4.81 mi route + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/_data/route-db-invariants.py b/_data/route-db-invariants.py index fa0950f..2de8168 100644 --- a/_data/route-db-invariants.py +++ b/_data/route-db-invariants.py @@ -33,35 +33,35 @@ def warn_rc(route, msg): warn(f"route {route['id']}: {msg}") def check_route(route): - # all fields are set + # all fields set for field in FIELDS: - if field not in route: # TODO need to see if blank! - warn_rc(route, f"no field {field}") + if field not in route or route[field].strip() == '': + warn_rc(route, f"missing '{field}' field") - # type is valid + # valid type if route['type'] not in TYPES: - warn_rc(route, f"invalid type {route['type']}") + warn_rc(route, f"invalid type '{route['type']}'") - # start and end locations are valid + # valid start and end locations if route['start'] not in LOCS: - warn_rc(route, f"invalid start {route['start']}") + warn_rc(route, f"invalid start '{route['start']}'") if route['end'] not in LOCS: - warn_rc(route, f"invalid end {route['end']}") + warn_rc(route, f"invalid end '{route['end']}'") - # dist and elev are numbers + # valid dist and elev try: - float(route['dist']) - except ValueError: - warn_rc(route, f"invalid dist {route['dist']}") + assert 0 < float(route['dist']) + except: + warn_rc(route, f"invalid dist '{route['dist']}'") try: - float(route['elev']) - except ValueError: - warn_rc(route, f"invalid elev {route['elev']}") + assert 0 < float(route['elev']) + except: + warn_rc(route, f"invalid elev '{route['elev']}'") # every route has a gpx gpx_path = os.path.join(gpx_dir, route['id']) + '.gpx' if not os.path.isfile(gpx_path): - warn_rc(route, f"no GPX file at {gpx_path}") + warn_rc(route, f"no GPX file at '{gpx_path}'") # MAIN diff --git a/_data/route-db.csv b/_data/route-db.csv index dc88472..259f82d 100644 --- a/_data/route-db.csv +++ b/_data/route-db.csv @@ -1,4 +1,6 @@ id,name,start,dist,elev,end,type,map +beacon-i90-trail-cap-hill,"Beacon Hill, I90 Trail, Cap Hill",Beacon,4.8,530,CapHill,P2P,https://onthegomap.com/s/8jo5uqcm +beacon-i90-bridge-cap-hill,"Beacon Hill, I90 Bridge, Cap Hill",Beacon,10.1,1190,CapHill,P2P,https://onthegomap.com/s/kps8bd3u beacon-i90-luther-burbank-ob,"OB: Beacon, I90, Luther Burbank",Beacon,13.1,1470,Beacon,OB,https://onthegomap.com/s/4kn8h5of cse-lwb-cc,"CSE, LWB, Columbia City",CSE,8.8,650,ColCity,P2P,https://onthegomap.com/s/k3pikua1 cse-520-wetherill-ob,"OB: CSE, 520, Wetherill Preserve",CSE,9.8,710,CSE,OB,https://onthegomap.com/s/jssjhikb