Coordinate transformation for laminar and turbulent boundary layers