...
Interpolation of Railway Network milepost: downloaded shp file from National Railway Network Canada Open Data (e.g., SK folder, only tracks and marker post, and grade crossing as well) is partially manual and automated (use FME and ArcGIS to clean data). Several factors can affect the calculation of mileposts such as:
...
Filter TRACKCLASS=Main from *TRACK.shp (there are also spurs, branches off main track, and railway yards, which we don’t need those to interpolate location)
Connect tracks to form a continuous segment grouped by the following attributes:
i) RAILWAY
ii) SUBDI1NAME
iii) FROM
iv) TOCompare/validate the length against NRCAN value.
Validate polyline start/end direction using Grade Crossing milepost for consistency. Reverse direction or flag in the database if necessary.
Validate NRCAN start/end values against Grade Crossing milepost for consistency. Readjust values in the database if necessary.
Perform manual cleanup such as segmented tracks, parallel tracks, split etc.
Repeat the process using the last modified dataset until all tracks are fixed.
...