Diagnostics of railways and subways of the world