The rising cost of land in city centers, an increased interest in walkable neighborhoods and growth in online car shopping have made urban dealerships tempting targets for redevelopment.

Standing on the outdoor terrace of an office tower being built on the west side of Los Angeles, one can easily see why the location is such a selling point. The Santa Monica Mountains lie to the north, the Expo Line light rail has a stop one block south, and the Pacific Ocean stretches westward.

But Dan Martin sees history: His family’s car dealership, Martin Cadillac, once the busiest on the West Coast, previously sat on the five-acre construction site; he was born in 1974, the same year it opened.

A massive bank of garages and maintenance bays where Mr. Martin used to fetch parts as a summer job will be replaced by 600 apartments. New office space, leased by Riot Games, and storefronts will stand where rows of flashy Eldorados and Coupe DeVilles once impressed commuters at the busy corner of Bundy Drive and Olympic Boulevard.

“This is an ocean of opportunity,” said Douglas H. Metzler, West Coast chief executive of Hines, the developer collaborating with the Martins to redevelop the site, called West Edge. “To do a pre-eminent project in Southern California, you need scale, you need quality, and you need density.”

The idea of finding new uses for car lots has existed for decades, but the transformation of Martin Cadillac illustrates how trends in real estate and the auto industry are rapidly converging. The rising cost of land in downtown areas and a premium on walkable commercial districts have recently made urban car lots tempting targets for developers. And with the move toward online car shopping, dealerships no longer need large sales spaces.

“The car dealership is not going away, but it may look a lot differently in urban centers in the next 10 to 15 years,” said Brady Schmidt, president and co-chief executive of National Business Brokers, a firm that helps owners buy and sell dealerships. “What dealers are hoping for, at least the dealers that I’m talking to, is to be able to get the best of both worlds: They want to redevelop these sites to include high-density housing and not have to sell or give up their dealership to do it.”

Strategically situated on busy intersections, dealerships offer some of the last — and largest — parcels of relatively easy infill development. Most consist of a few single-story buildings and large asphalt lots, and they require relatively minor environmental cleanup. Converting dealerships into dense developments is a sort of urban upgrade; car-centric space can become something more walkable, transit-connected and ideally more sustainable.

The redevelopment projects are popping up across the nation.

In Durham, N.C., Hines plans to break ground on the former University Ford lot this year, looking to expand the American Tobacco Campus, a redeveloped factory complex with retail, restaurants and events spaces.

The Price Simms Family Dealerships, which owns 14 locations in Silicon Valley and Northern California, plans to transform its Toyota franchise in Walnut Creek into a multistory showroom and residential project, with a smaller dealership occupying the ground floors of the project. The value of the business is being overtaken by the underlying value of the real estate, said Adam Simms, the company’s chief executive.

And two development firms in Wilmington, N.C., aim to turn an auto dealership next to a defunct Kmart into 298 apartments and stores in a complex called Paseo. “It was such a nasty eyesore,” said Mariana D. Molina, president and founder of Bella Vista Development, one of the firms on the project. “It’s a really car-centric community, and this is just a sea of parking.”

The roughly 18,000 new-car dealerships in the United States operate in a state of flux, according to industry experts. A rising interest in electric vehicles and increased online shopping, among other significant shifts, point to a future where these businesses offer different shopping experiences.

Stereotypical visions of endless rows of cars festooned with colorful plastic flags and inflatable sky dancers nodding in the breeze will give way to a smaller footprint for sales and more room for maintenance and electric vehicle charging infrastructure, said Inga Maurer, a senior partner and auto expert at McKinsey & Company. Electric cars will not need oil changes or powertrains replaced, but the increasing amount of sensors and electronics in them will still require visits to mechanics.

Despite these shifts, 75 percent of customers still view the test drive and on-site experience as a core part of their buying journey, Ms. Maurer said. And the franchise model for car sales means that even if consumers begin shopping online, they need to finish the transaction with the dealer.

For example, Price Simms’s plan aims in part to transform the Walnut Creek Toyota into an Apple store-type shopping experience, with high-end digital displays incorporated into the sales floor. The decision by company executives to be a part of the redevelopment is a reminder that because dealership owners have the right to operate only in a relatively small territory, they cannot simply sell their land and reopen across town at a cheaper site.

Even as electric-car brands like Tesla sell directly to consumers without a dealer, Ms. Maurer and others see little chance that the system will drastically change.

Last year, with record prices for used cars, a pent-up demand for repairs and increasing margins, dealers had a banner year, and 100 more dealerships opened than closed. But the number of franchised car dealerships has steadily declined from a high of about 47,000 in 1950, according to the National Automobile Dealers Association. Families that have owned dealerships for decades can see significant upside selling their land.

In Nashville, the Reed family’s Chevrolet dealership had anchored the city’s midtown since its patriarch, Jim Reed Jr., opened a brick building in 1930 to hawk automobiles. Generations of Nashville residents would recognize “Ol Jim,” a squat cowboy mascot who appeared on a billboard on Broadway to help peddle rows of Chevys.

During the last two decades of Nashville’s building boom, the city has grown up around the site, which sits near the upscale neighborhood of Gulch, Music Row and Vanderbilt University, said Vikram Mehra, a senior managing director at Hines.

“I couldn’t ask for more prominent real estate,” he said. “We’re creating a place that’s worth more than the sum of its parts. The whole mixed-use vibrancy is what people are seeking.”

Combined with a century-old Coca-Cola bottling plant, which Hines also acquired, the 12-acre Reed District, named to honor the family’s dealership, will create a dense “urban village” set to open in 2026, with commercial and retail space interspersed with a network of walkways. Antique signage from the Reed dealership, as well as classic Chevrolet models, will be refurbished and displayed throughout the development to add continuity and context.

Filling in the loose patchwork of urban landscapes is efficient because the sites are connected to transit, water and other infrastructure, and new residential developments won’t displace existing residents, said Ed McMahon, senior fellow for sustainable development at the Urban Land Institute. The California Legislature recently passed a law to simplify the conversion of commercial spaces to housing.

“There’s a demand for redevelopment in the suburbs in particular, and then the climate change imperative, which all moves toward more adaptive reuse,” Mr. McMahon said.

The vitality of these mixed-use developments is a draw to potential residents. Mr. Martin, for instance, plans to move into the West Edge development as soon as the apartments are ready. For him, the site will be a physical representation of the Martin family legacy: A huge window on the corner will mimic the showrooms that formerly displayed new sedans.

The Martins pushed to make sure 20 percent of the homes were affordable, a family priority, to help alleviate Los Angeles’s dire housing shortage. And by hitting those affordability metrics, the builders were allowed to build higher and add more apartments.

“We didn’t want to sell, take the cash and leave,” Mr. Martin said. “When you’re operating on a property for that long with your name on it, it’s important to stick with it.”