A total of 16 railcars overturned, including 2 with hazardous materials, but there is no threat to the public, officials say.