City inks pact with railroad