Essentially, in either of the cases, you would be perfectly safe to do what you did - considering obstacles.
Here is the TC CARs reference:
Part V - Airworthiness Manual Chapter 525 - Transport Category Aeroplanes - Transport Canada
Keep reading to about 525.121 if you want to know about climb gradient requirements after takeoff.
If you want the FAA FARs reference, take off the first 5 and that's what it is. Ie: FAR 25.107 -
Electronic Code of Federal Regulations:
You'll find the CARs is essentially a carbon-copy of the FARs.