He was careful to give the piers a context. He shot the waterfront neighborhood with its bars (The Ramrod, Badlands, the Stud), its transient hotels, and its commercial truck parking lots (which also served as nocturnal trysting places). And he photographed, at varying distances, the abandoned shipping depots and warehouse sheds on the piers themselves.

As a group, these images are invaluable contributions to American urban visual history, but also to art history. A lot of new art was happening on the piers. In 1975, the New York artist Gordon Matta-Clark sliced a huge crescent-shaped, light flooded hole in a west-facing wall on Pier 52 and titled it “Day’s End”; a painter named Tava (Gustav von Will) was doing murals, as were younger contemporaries like Mike Bidlo and David Wojnarowicz. Mr. Baltrop recorded some of this work, though it seemed incidental to his true interest. What really gripped him was the grandeur and danger of structural ruin, and the people who occupied it.

Look closely at his panoramic views of pier exteriors and you’ll see, in many, the presence of tiny figures, clothed or nude, leaning from windows, lounging around, having sex. And the majority of his shots were of populated interiors. In Pier 52, he used a homemade version of a window-cleaner’s harness to suspend himself from the ceiling and survey activities below. At the same time, because he became a regular, unthreatening presence, he was able to photograph on-the-ground action, much of it sexual, from an intimate vantage.

The piers were not benign places, and Mr. Baltrop knew it. Muggings were common. Murders happened. He took chilling pictures of the police fishing bodies from the Hudson. (One locally famous waterfront habitué, the drag queen and activist Marsha P. Johnson, of whom Mr. Baltrop made a wonderful portrait, was found dead in the river in 1992.) He spoke, later in his life, of “the frightening, mad, unbelievable, violent, beautiful things that were going on” at the piers. He was aware that his own attraction to them had a pathological element. “It became an addiction,” he said. “It was like a drug. It was a drug.”