For starters, consult the draft railway manual here:
https://forum.travelmapping.net/index.php?topic=5635.0With that in hand, the basic mechanics of how the site functions go something like this:
- each individual route has a waypoint file (.wpt).
Here's an example of what one looks like, representing the Amtrak NE Corridor in Connecticut. The file content takes the form of each line is an individual "point" along the route that will be connected by straight lines, and they're listed in order from one end to the other. Each line begins with the name of the waypoint, and ends with an OpenStreetMap URL containing the latitude an longitude of it, and these two things are separated by a space. If the waypoint label has a + before it, it's a hidden point that is used either only for shaping or, in the case of railways, it may represent a station along the line this train does not stop at (labels beginning with "+SKIP_") or a location where two lines merge/diverge (labels beginning with "+DIV_").
- if two lines intersect, it is crucial that the latitude and longitude of the intersection point be identical between both wpt files. This will create a "graph connection" allowing users to click between the two lines if they select that point.
- if two lines follow the same tracks, it is crucial that the latitude and longitude of the points on the shared section be identical between the wpt files for each. This is how the site detects concurrencies and they will fail to detect if the two point coords are off even slightly.
- each system has two csv files, a vanilla one and a _con one. These files tell the site what to do with wpt files. Here are the two for Amtrak:
https://github.com/Duke87ofST/RailwayData/blob/master/data/_systems/usaamtk.csvhttps://github.com/Duke87ofST/RailwayData/blob/master/data/_systems/usaamtk_con.csvEach line in the vanilla csv file corresponds to a wpt file. Each line in the _con csv file corresponds to a route, which may in some cases contain multiple wpt files if it crosses a jurisdictional boundary in the process.
- each system, once created, needs a line in
systems.csv for it to load onto the site
There's considerably more to it, but those are the starting basics. Definitely take some time to poke around files on GitHub and familiarize yourself both with the file formats and the directory structures before you do anything else - and we'd appreciate you pointing out anything you spot that you think may be an error or an inconsistency with our drafting guidelines.
When you're ready to try your hand at making a wpt file, this tool is your friend:
https://travelmapping.net/wptedit/Double click to center the map where you want to add a waypoint, then click the "Add Waypoint" button and go from there. When you're done you'll need to copy and paste all the text in the box to somewhere else in order to save it. We use GitHub as the system of record but for starting out I would strongly suggest trying one and then pasting the contents into this thread so we can let you know if it looks right.