Long before Urban Cowboy there were urban cowboys. The official title of the 1900 photo above is “Railroad Signalman on 11th Ave., N. Y.” but those horsemen were commonly known as railroad cowboys.
The original New York Central ran west from Albany, and as such was central to upstate New York. When the Cornelius Vanderbilt, the owner of the road, wanted to expand south to New York City, he bought the existing Hudson River Railroad and merged the two, which gave him access to the west side of Manhattan. He then leased the Harlem River Railroad, which gave him access to the east side and eventually led to the construction of Grand Central Depot on the east side. The trackage on the west side was converted to all-freight, ending at the depot that replaced St. John’s Park in what’s now called Tribeca. Some of the tracks along the river were out of the way, but there was a long stretch where they ran in Eleventh Avenue, in among pedestrians and horse wagons. The cowboys were signal men, whose job was simply to warn people that a train was coming. It was not enough: there’s an estimate from 1910 that over 500 people had been killed and 1500 injured by trains on Eleventh Avenue. Eventually, an elevated viaduct was built for the trains, and then abandoned, and then turned into the High Line park.