The Kerala High Court, the Office of the Corporation of Kochiand the Cochin Stock Exchange are situated here. The Ernakulam Junction is a major railway station of the Indian Railways. Initially, Ernakulam was the headquarters of the Ernakulam District but was later shifted to Kakkanad. Ernakulam was once the capital of the Kingdom of Cochin. It is located 220 kilometres (137 mi) north-west of the state capital Thiruvananthapuram. The city has served as an incubator for many Malayali entrepreneurs and is a major financial and commercial hub of Kerala.