I've been thinking about an organizational hierarchy for highways, and I have a proposal for how to do it:
At the top you have "Countries", which represent countries and international route systems (eg E-Routes).
Within Countries, there are "Networks", which represent either regional systems (such as state highway networks) or national networks (such as Motorways, Interstates, or the TCH)
Within Networks, there are "Systems", which represent individual systems within a network (such as state routes and parkways within a state) or different classifications of routes within a national network (such as mainline versus bannered US Highways)
Within Systems, we have the individual highways, which are composed of wpt segments.
Each folder would contain a metadata.json file which would contain some information about user-facing text, as well as potential support for translations. An example for a country would be:
{
"abbr":"US"
"name:"United States"
"name_en":"United States"
"name_es":"Estados Unidos"
}
Each route would contain its wpt segments and a shield.png file which would be the shield used for the route, as well as a modified metadata.json which would contain information about individual segments of the route. A route metadata.json would look somewhat like this:
{
"name": "Interstate 74",
"segments": [
{
"region": "IA",
"num":0,
"mileage": 15,
"waypoints": "ia.wpt"
},
{
"region": "IL",
"num":1,
"mileage": 220,
"waypoints":"il.wpt"
},
{
"region": "IN",
"num":2,
"mileage": 180,
"waypoints":"in.wpt"
},
{
"region": "OH",
"num":3,
"mileage": 35,
"waypoints": "oh.wpt"
},
{
"region": "NC",
"num": 4,
"locale": "Mt. Airy, NC",
"mileage": 15,
"waypoints": "nc_mtairy.wpt"
},
{
"region": "NC",
"num": 5,
"locale": "Ellerbe, NC",
"mileage": 70,
"waypoints": "nc_ellerbe.wpt"
},
{
"region": "NC",
"num": 6,
"locale": "Lumberton, NC",
"mileage": 15,
"waypoints": "nc_lumberton.wpt"
},
]
}
The 'locale' field would be used in the case of routes with multiple segments within a single region.
Here's an example tree for this proposed hierarchy (obviously not complete):
highway
├── CN
├── EU
├── UK
└── US
├── AK
├── AL
├── I
│ ├── bus
│ │ ├── 95
│ │ │ ├── ga_savannah.wpt
│ │ │ ├── metadata.json
│ │ │ ├── nc_fayetteville.json
│ │ │ └── shield.png
│ │ └── metadata.json
│ ├── future
│ │ └── 74
│ │ ├── metadata.json
│ │ ├── nc_laurinburg.wpt
│ │ ├── nc_pilotmtn.wpt
│ │ └── shield.png
│ ├── main
│ │ ├── 2
│ │ │ ├── metadata.json
│ │ │ ├── shield.png
│ │ │ └── tx.wpt
│ │ ├── 4
│ │ │ ├── fl.wpt
│ │ │ ├── metadata.json
│ │ │ └── shield.png
│ │ ├── 5
│ │ │ ├── ca.wpt
│ │ │ ├── metadata.json
│ │ │ ├── or.wpt
│ │ │ ├── shield.png
│ │ │ └── wa.wpt
│ │ └── metadata.json
│ └── metadata.json
├── KY
│ ├── banner
│ ├── main
│ ├── metadata.json
│ └── parkway
├── metadata.json
├── named_freeways
└── US
├── banner
├── main
│ ├── 1
│ │ ├── ct.wpt
│ │ ├── dc.wpt
│ │ ├── fl.wpt
│ │ ├── ga.wpt
│ │ ├── ma.wpt
│ │ ├── md.wpt
│ │ ├── metadata.json
│ │ ├── me.wpt
│ │ ├── nc.wpt
│ │ ├── nh.wpt
│ │ ├── nj.wpt
│ │ ├── ny.wpt
│ │ ├── pa.wpt
│ │ ├── ri.wpt
│ │ ├── sc.wpt
│ │ ├── shield.png
│ │ └── va.wpt
│ └── metadata.json
└── metadata.json
Thoughts?