Cities can’t win. When they do well, people resent them as citadels of inequality; when they do badly, they are cesspools of hopelessness. In the seventies and eighties, the seemingly permanent urban crisis became the verdict that American civilization had passed on itself. Forty years later, cities mostly thrive, crime has been in vertiginous decline, the young cluster together in old neighborhoods, drinking more espresso per capita in Seattle than in Naples, while in San Francisco the demand for inner-city housing is so keen that one-bedroom apartments become scenes of civic conflict—and so big cities turn into hateful centers of self-absorbed privilege. We oscillate between “Taxi Driver” and “The Bonfire of the Vanities” without arriving at a stable picture of something in between.

Has it ever been acceptable to regard a big city as admirable through and through? Maybe in books about Paris and London from around 1910 to the Second World War, and in books about New York in the years just after the Second World War, before the Dodgers moved and the big fractures began. For the rest, whether it’s Victorian London or post-sixties New York, pop novels and scholarly urbanism are most often voiced in a tone of complaint or querulous warning. (The outlier is the architectural historian Reyner Banham’s 1971 “Los Angeles: The Architecture of Four Ecologies,” still the best book ever written about an American city, its happiness fuelled by an Englishman’s perversity: Everyone says L.A. sucks? I’ll show you it shines.) Nothing urban would be more likely to evoke disgust than a study promoting a benign picture of Bloomberg’s New York—even though, in reality, that city was relatively peaceful (and self-healing from the worst war wound in its history) and prosperous (if more and more unevenly so), with the parks restored or expanding and the subways so safe that they became crowded at two or three in the morning. Those of us who dreamed of the High Line as an improbable public benefit, and then saw it come true, had to accept that it would next become a subject of ridicule, as a cynical developer’s amenity, a green-tinted scam.

The reason that perceptions of cities switch so radically is twofold. Cities are the contradictions of capitalism, spelled out in crowds. They are engines of prosperity and inequality in equal measure, and when the inequality tips poor they look unsavable; when it tips rich, they look unjust. And then cities enfold a subtler contradiction—they shine by bringing like-minded people in from the hinterland (gays, geeks, Jews, artists, bohemians), but they thrive by asking unlike-minded people to live together in the enveloping metropolis. While the clumping is fun, the coexistence is the greater social miracle, though not one that lends itself to stories. Greenwich Village and Park Slope and Southie count as homes and get reverent treatment; a musical might be made of hipsters and Hasidim learning to live together in Williamsburg. But a movie about the lives of the people in a single car on the 6 train would trail off into inconsequence, since the point is that city kinds and lives are so different that contiguity is their only coinciding point. (The one proviso of the local story is that the neighborhood must be under assault and the narrator must side with the old ways, even if he or she is representative of new ones. And so Ray, in Lena Dunham’s beautifully observed, Brooklyn-based “Girls,” runs for the local community board as a champion of preservation, not transformation, though he is utterly typical of the transformative kind.)

The things that give cities a bad conscience are self-evident: seeing the rise of 432 Park Avenue, the tallest, ugliest, and among the most expensive private residences in the city’s history—the Oligarch’s Erection, as it should be known—as a catchment for the rich from which to look down on everyone else, it is hard not to feel that the civic virtues of commonality have been betrayed. Every day brings news of old favorites closed, familiar neighborhoods homogenized, ethnic enclaves turned over to the legions of Capital, not to mention Oberlin and Bard.

Yet the social crises that cities face are remarkably consistent, country to country and town to town. Very little that is going on in New York, from plutocratic excess to outlying gentrification, is not also going on, with different emphases and origins, in London: the same tales of people who drink wine and lattes buying the property of those who drink whiskey and beer. At the same time, cities are local. Saying that Manhattan and central London share the same problems is like saying that a man dying of drink in London is like one doing the same in Manhattan. It’s true, but all the local conditions—what he’s drinking, where he drinks it, who takes him home, and what kind of home he goes to—are so different that a story about the drunk in either place becomes a story about the place. Cities are at once the most cosmopolitan and the most particular of subjects; they require, and rarely receive, a view sufficiently wide-eyed as to become effectively double.

The foundation of the city is its spatial organization, the way its streets meet and the way its citizens travel on them. Gerard Koeppel’s “City on a Grid” (Da Capo) tells the too little-known tale of how and why Manhattan came to be the waffle-board city we know. He shows us that the grid, far from being a long-range plan imposed by a class of managers, was the result more of a shrug, an inconclusive meeting, and a big “Why not?” Koeppel reproduces the key paragraph of the Gouverneur Morris report of 1811:

Whether they should confine themselves to rectilinear and rectangular Streets, or whether they should adopt some of those supposed Improvements by Circles, Ovals, and Stars, which certainly embellish a plan . . . they could not but bear in mind that a City is to be composed principally of the Habitations of men, and that strait sided and right-angled Houses are the most cheap to build and the most convenient to live in.

Koeppel argues, convincingly, that the show of hardheaded rationality here is merely a show. There was no good commercial reason to make a thrifty city of intersections at right angles. London, the model of an imperial commercial city, had its ovals and organic oddities and still prospered. Philadelphia had lovely squares interrupting its own version of the grid. Straight-sided and right-angled houses can be built in circles as well as on street corners. The details of New York’s grid turn out to be surprisingly haphazard and improvisational in their origins. As Koeppel points out, no one has ever provided a good explanation for why the wide two-way streets were chosen to fall where they do—at Fourteenth, Twenty-third, Thirty-fourth. In general, he persuades us, the impulse behind the grid was less the rationalizing impulses of the Enlightenment than the eternal desire of a bureaucratic commission to finish its report, accented, later, by the eternal real-estate developers’ urge to have regularized lots to develop.