That was indeed, a cog railway in Hong Kong. It went up a mountain and led to a tower with a quite scenic overlook of Hong Kong Island to East and mainland China to the West. Had an exellent restaurant there too, if my failing memory serves me right! Don't know if that's still there, it's all Peoples Republic now.
Regards.....
steamboat