“The vast majority of these accidents and deaths are preventable,” said Sarah Feinberg, the Federal Railroad Administration’s acting administrator. “In some cases, maybe a driver intends to beat the train, thinks they are familiar with the route or still have time to cross. But there are many cases where drivers lack situational awareness, because it may be dark or the route is unfamiliar.”

She points out that many drivers now routinely plug their destination into their smartphones, often to find the fastest itinerary or avoid traffic.

No date has been given for when the crossing information will be available on Google Maps, but Department of Transportation officials say the company has made the project a priority.

“We’re happy to help the Federal Railroad Administration as we’re always looking for new ways to make maps useful to our users,” Mara Harris, a Google spokeswoman, said.

The Department of Transportation has developed its own app, called the Rail Crossing Location Mobile Application, that provides drivers with a catalog of all crossing locations. But the app does not alert drivers when they are about to cross over tracks. It is also not used much. The same data found on this app would also be used by Google and others.

“We have some really good data on these crossings but we have to put the data where people are using it,” Ms. Feinberg said. “What makes sense is to take that data where people are gathering. It makes much more sense for me to share my data with Google, rather than try to get Google users to come to my app. For us, it makes a ton of sense to get that information out there.”

In February, a Metro-North commuter train struck a sport utility vehicle that was stuck on the tracks, killing six people. That accident took place just weeks after Ms. Feinberg, formerly the chief of staff to the secretary of transportation, was named as the railroad agency’s acting administrator.