Rail regulations in Canada

Rail regulations in Canada are set by Transport Canada and the Canadian Transportation Agency. The 2007 "Railway Safety Act Review" was commissioned by the Minister of Transport and its report provides much-needed background to this article, especially section 4.3. The governance of railways in Canada is complex and has many tiers: Acts of Parliament, Regulations, Rules, and Directives are only some of the instruments that impact this industry.
Scope.
Federal regulations apply only to certain railways which meet one or more of the following conditions:
A railway that is regulated under either of the two last qualifications is considered to be "a work for the general advantage of Canada."
List of 32 Federal Railway Companies.
The following is a list of all federal railway companies
Provincial Charters.
Railways can also be licensed by the provinces, under applicable provincial railway safety legislation. The only provinces without railways under their jurisdiction as of 2007 are in Newfoundland and Labrador, and in Prince Edward Island. In Ontario, railways licensed under the Shortline Railways Act, 1995 can operate within that province, but not cross provincial or international boundaries. 
In New Brunswick. shortline railways are governed by the Shortline Railways Act, 2011. The prior Act was in force since 1994, with amendments also made in 2013. 
Alternatively, "several railways are operating that do not have certificates of fitness from the CTA [Transport Canada], and are not regulated under corresponding provincial railway safety legislation". These are mainly commuter railways. 
Tracks.
Transport Canada's "Rules Respecting Track Safety" apply to all federally regulated railway companies operating on standard gauge track. As a consequence, the narrow gauge White Pass & Yukon Route railway is excluded from these regulations.
Speed.
Though Canada uses kilometres per hour on roadways, rail speed limits are set in miles per hour (mph).
Tracks are classified and the speed limit is determined by the type. The track class speed limits are nearly identical to the speed limits set by the Federal Railway Administration in the United States.
Interswitching.
Interswitching by a terminal railway is regulated by the Canadian Transportation Agency. Regulations do not apply where 90% the railway's gross revenue comes from interswitching.
In situations where the regulations apply, terminal railways are required to give equal treatment interswitching traffic and are prohibited from charging for delivery or return of an empty car. They are required to follow a rate schedule set by the CTA.
Railway police.
Any superior court judge may appoint a person as a police constable charged with enforcing federal and provincial laws as well as Part 3 of the "Canadian Transportation Act" in regards to railway property. Section 44 of the "Railway Safety Act" limits jurisdiction of Railway constables to property owned, used or managed by the railway and the area around it.
Work and Rest Rules.
Transport Canada limits the on duty time on a single shift for engineers, conductors and yard workers and all workers involved in switching or operating trains to 12 hours, including those working split shifts. The exception is work train crews, who may work 16 hours. The total maximum over multiple shifts is 18 hours.
To reset the clock, a worker must receive 8 hours off at their home terminal or 6 hours away from home.
Emergencies.
During emergencies, defined as unforeseen situations that may cause harm to employees, passengers, the public or the environment such as accidents, derailments, natural disasters and acts of God but not locomotive breakdowns or broken rails, employees may work until relieved subject to fatigue management policies.