Module:Roadtable/models
Jump to navigation
Jump to search
Code
local data = {}
local fullOrder = {'P31', 'P14', 'P8505', 'P8498', 'P8898', 'P15', 'P3096', 'P131', 'P17', 'P126', 'P127', 'P16', 'P559', 'P609', 'P580', P580 = {'P580', 'P582', 'P571', 'P576'}, 'P2043', 'P402', 'P1282'}
data.images = {
langs = 'WP-TranslationProject TwoFlags.svg',
P31 = 'Autoroute icone.svg',
P14 = 'US 66.svg',
P8505 = 'Ellipse sign template.svg',
P8498 = 'AHN-AH1.svg',
P8898 = 'Winnipeg city route X.svg',
P15 = 'Oxygen480-categories-applications-internet.svg',
P3096 = 'USRD KML.svg',
P131 = 'Gswitchit-applet.svg',
P17 = 'UKfilm.svg',
P126 = 'Oxygen480-categories-applications-engineering.svg',
P127 = 'Oxygen480-apps-system-users.svg',
P16 = 'Sinnbild Autobahnkreuz.svg',
P559 = 'Zeichen 357.svg',
P609 = 'Sinnbild Innerorts.svg',
P580 = 'Oxygen480-apps-preferences-system-time.svg',
P402 = 'Openstreetmap logo.svg',
P1282 = 'Openstreetmap logo.svg',
}
data.models = { --[[ Properties:
31: instance of; 14: shield; 15: map; 3096: KML; 131: is in; 17: country;
126: maintenance; 127: ownership; 16: system;
559: termini; 609: terminus locations; 580/582: start/end date;
2043: length;
8498: road number formatter; 8898: road name formatter;
402: OpenStreetMap relation ID;
1282: OpenStreetMap tag or key ]]
full = fullOrder, -- Full list of properties
route = {'P31', P31 = 34442, 'P14', 'P15', 'P3096', 'P131', 'P17', 'P126', 'P127', 'P16', 'P559', 'P609', 'P580', P580 = {'P580', 'P582', 'P571', 'P576'}, 'P2043', 'P402'}, -- Standard numbered route
['national-route'] = {'P31', P31 = {34442, 1716124}, 'P14', 'P15', 'P3096', 'P131', 'P17', 'P126', 'P127', 'P16', 'P559', 'P609', 'P580', P580 = {'P580', 'P582', 'P571', 'P576'}, 'P2043', 'P402'}, -- same as route, but supports national road in addition to road
['national-summary'] = {'P31', P31 = 34442, 'P14', 'P15', 'P3096', 'P131', 'P17', 'P16', 'P559', 'P609', 'P580', P580 = {'P580', 'P582', 'P571', 'P576'}, 'P2043'}, -- National route summary
turnpike = {'P31', P31 = 34442, 'P14', 'P15', 'P3096', 'P131', 'P17', 'P126', 'P127', 'P16', 'P559', 'P609', 'P580', P580 = {'P580', 'P582', 'P571', 'P576'}, 'P2043'}, -- Modern turnpike
bannered = {'P31', P31 = 34442, 'P15', 'P3096', 'P131', 'P17', 'P126', 'P127', 'P16', 'P559', 'P609', 'P580', P580 = {'P580', 'P582', 'P571', 'P576'}, 'P2043', 'P402'}, -- Bannered route
named = {'P31', P31 = 34442, 'P15', 'P3096', 'P131', 'P17', 'P126', 'P127', 'P16', 'P559', 'P609', 'P580', P580 = {'P580', 'P582', 'P571', 'P576'}, 'P2043'}, -- Named road
byway = {'P31', P31 = 800517, 'P15', 'P3096', 'P131', 'P17', 'P126', 'P127', 'P16', 'P559', 'P609', 'P580', P580 = {'P580', 'P582', 'P571', 'P576'}, 'P2043'}, -- Scenic byway
['local'] = {'P31', P31 = 34442, 'P15', 'P3096', 'P131', 'P17', 'P126', 'P127', 'P559', 'P609', 'P580', P580 = {'P580', 'P582', 'P571', 'P576'}, 'P2043'}, -- Local road
['pre-signed'] = {'P31', P31 = 34442, 'P15', 'P3096', 'P131', 'P17', 'P559', 'P609', 'P580', P580 = {'P580', 'P582', 'P571', 'P576'}, 'P2043'}, -- Road pre-dating modern systems
network = {'P31', P31 = {'P31', P31 = 358078, 'P279', P279 = 269949},
'P15', 'P131', 'P17', 'P126', 'P127', 'P580', P580 = {'P580', 'P582', 'P571', 'P576'}, 'P2043'}, -- Road network
system = {'P31', P31 = {'P31', P31 = 25631158, 'P279', P279 = 269949}, 'P8505', 'P8498', 'P8898',
'P14', 'P15', 'P131', 'P17', 'P126', 'P127', 'P580', P580 = {'P580', 'P582', 'P571', 'P576'}, 'P2043', 'P1282'}, -- Highway system
['regional-network'] = { 'P15', 'P131', 'P17', }, -- Regional highway network
list = {'P31', P31 = 13406463, 'P15', 'P131', 'P17', 'P126', 'P127', 'P16' }, -- List of roads
rcs = {'P31', P31 = 13406463, 'P17', 'P16' }, -- RCS list
agency = {'P31', 'P131', 'P17', 'P580', P580 = {'P580', 'P582', 'P571', 'P576'} }, -- Government or private highway operator
infrastructure = {'P31', 'P131', 'P17', 'P126', 'P127', 'P580', P580 = {'P580', 'P582', 'P571', 'P576'} }, -- Bridges, tunnels, and interchanges
bridge = {'P31', 'P131', 'P17', 'P126', 'P127', 'P580', P580 = {'P580', 'P582', 'P571', 'P576'}, 'P2043'}, -- Bridge
tunnel = {'P31', 'P131', 'P17', 'P126', 'P127', 'P580', P580 = {'P580', 'P582', 'P571', 'P576'}, 'P2043'}, -- Tunnel
interchange = {'P31', 'P15', 'P131', 'P17', 'P126', 'P127', 'P580', P580 = {'P580', 'P582', 'P571', 'P576'} }, -- Interchange
project = {'P31', 'P15', 'P131', 'P17', 'P580', P580 = {'P580', 'P582', 'P571', 'P576'} }, -- Construction project
renumbering = {'P31', 'P17' }, -- Highway renumbering
basic = {'P31', 'P17' }, -- Bare necessities
}
data.classes = {
route = {D = {'P31', 'P17', 'P126', 'P127', 'P16'}, C = {'P14', 'P15', 'P3096', 'P131'}, B = {operator='some', count=2, {'P559', 'P609'}, 'P580', 'P2043'}, A = {{'P559', 'P609'}, 'P580', 'P2043', 'P402'}},
['national-summary'] = {D = {'P31', 'P17', 'P16'}, C = {'P14', 'P15', 'P3096', 'P131'}, B = {operator='some', count=2, {'P559', 'P609'}, 'P580', 'P2043'}, A = {{'P559', 'P609'}, 'P580', 'P2043'}},
turnpike = {D = {'P31', 'P17', 'P126', 'P127', 'P16'}, C = {'P14', 'P15', 'P3096', 'P131'}, B = {operator='some', count=2, {'P559', 'P609'}, 'P580', 'P2043'}, A = {{'P559', 'P609'}, 'P580', 'P2043'}},
bannered = {D = {'P31', 'P17', 'P126', 'P127', 'P16'}, C = {'P15', 'P3096', 'P131'}, B = {operator='some', count=2, {'P559', 'P609'}, 'P580', 'P2043'}, A = {{'P559', 'P609'}, 'P580', 'P2043', 'P402'}},
named = {D = {'P31', 'P17'}, C = {'P15', 'P3096', 'P131', 'P126', 'P127', 'P16'}, B = {operator='some', count=2, {'P559', 'P609'}, 'P580', 'P2043'}, A = {{'P559', 'P609'}, 'P580', 'P2043'}},
network = {D = {'P31', 'P17'}, C = {'P131', 'P126', 'P127'}, B = {operator='some', count=1, 'P2043', 'P580'}, A = {'P580', 'P2043'}},
system = {D = {'P31', 'P17'}, C = {'P131', 'P126', 'P127', 'P8498', 'P8505', 'P8898'}, B = {operator='some', count=1, 'P2043', 'P580'}, A = {'P580', 'P2043', 'P1282'}},
interchange = {D = {'P31', 'P17'}, C = {'P15', 'P131', 'P126', 'P127'}, B = {'P580'}},
}
return data