If it's an uncontrolled intersection with no stop signs (rare these days), then the safe speed is set based on two cars approaching intersection from different directions, being able to see each other and for both to be able to stop before a collision, plus some margin of safety.
In the case of an uncontrolled rail road crossing, if you can't see 400 feet in both directions while within 100 feet of the tracks, the speed limit in California is 15mph. I'm not sure of the maximum speed allowed for trains through such intersections, but it's probably between 50 and 70 mph. At 70 mph, the train travels 102 feet per second, so 400 feet would translate into about 4 seconds of reaction time.