In New York City, distance is measured in blocks. The number of blocks a New Yorker has to trek lugging an armful of groceries could mean the difference between a great neighborhood and a crummy one.

For many, that walk seems to be growing longer as corner markets and grocery stores have closed in neighborhoods across the city — forcing many New Yorkers to rethink their daily routines and in some cases changing the very tenor of a neighborhood.

The neighborhood grocery store — with its dim and narrow aisles full of provisions precariously stacked from floor to ceiling and the cashier who greets you and your dog by name — is a critical piece of a New York life. Supermarkets of suburban proportions, like Whole Foods, are making their mark on the city; Wegmans will open its first city store, in Brooklyn, in 2018.

But while these stores have distinctive — and sometimes pricier — offerings like artisanal cheese and artichoke ravioli, they cannot replace the labyrinthine corner market, a linchpin for any neighborhood. It can keep a neighborhood manageable for new parents who need diapers now or seniors who cannot carry their groceries a long way.