Montreal has the second-largest economy among Canadian cities based on GDP and the largest in Quebec. The city is today an important centre of commerce, finance, industry, technology, culture, world affairs and is the headquarters of the Montreal Exchange. Montreal industries include aerospace, electronic goods, pharmaceuticals, printed goods, software engineering, telecommunications, textile and apparel manufacturing, tobacco, petrochemicals, and transportation. The service sector is also h2 and includes civil, mechanical and process engineering, finance, higher education, and research and development. Montreal ranks as the 4th largest centre in North America in terms of aerospace jobs. The Port of Montreal is the largest inland port in the world handling 26 million tones of cargo annually. As one of the most important ports in Canada, it remains a trans-shipment point for grain, sugar, petroleum products, machinery, and consumer goods. For this reason, Montreal is the railway hub of Canada and has always been an extremely important rail city; it is home to the headquarters of the Canadian National Railway, and was home to the headquarters of the Canadian Pacific Railway.