West Coast cities have booming economies but neighborhoods that are filled with homeless people. Why? Here's everything you need to know:

How bad is it?

A tragic paradox is on display in Los Angeles and San Francisco: Their economies are vibrant, and legions of wealthy young professionals spend small fortunes on food, cars, and other consumer goods. Yet in some neighborhoods, people live as if in Third World slums. In L.A., tent cities line freeway underpasses, armies of rats stoke fears of disease, and thousands of homeless people share a dozen toilets. In San Francisco, drug needles and garbage line the streets, and the city employs four full-time workers to sweep up feces. Throughout the nation, according to the Department of Housing and Urban Development, the homeless population has been relatively stable in recent years, with about 550,000 Americans living without homes. California accounts for 12 percent of the U.S. population but a quarter of its homeless, and it's getting worse: Los Angeles County's homeless population jumped 12 percent this year, to nearly 59,000, while San Francisco's homeless count grew 17 percent over the past two years, to about 8,000 — nearly 1 percent of the city's population.

What's driving the problem?

Homelessness is a complex phenomenon with many causes, in­clud­ing mental illness and drug addiction. But the primary factor in Cal­i­for­nia is the skyrocketing cost of housing. Over the past six years in L.A., the median household income grew 23 percent, while the median rent increased 67 percent. An Angeleno must earn $47.52 an hour — more than triple the minimum wage — to afford the average monthly rent of $2,471. As a result, one-third of renters qualify as "severely rent burdened," meaning they spend at least half of their income on housing. In those circumstances, an unexpected cost or job loss can quickly result in people failing to pay the rent and landing on the street. For every 2 percent increase in L.A. rent, 4,227 people are likely to become homeless, according to the real estate database Zillow. In Oakland, one of the Bay Area's most rapidly gentrifying cities, homelessness has exploded by 47 percent since 2017. Across the bridge in San Francisco, the median one-bedroom apartment now rents for $3,690 per month.

Are there other factors?

The cities' temperate climates make it possible for people to live outdoors. Spending nights on the street can be nearly impossible during New York City's cold winters, which helps explain why just 5 percent of the city's homeless population is unsheltered. (The Big Apple houses more than 61,000 people every night in about 745 shelters.) Seventy-five percent of L.A.'s homeless are unsheltered, as are about 70 percent in San Francisco. San Francisco recently designated a city-owned parking lot for people living out of vans and RVs, allowing them to stay in this "triage lot" for up to 90 days. In 2007, Los Angeles officials agreed to stop enforcing an ordinance banning sleeping on the sidewalk. That allows as many as 10,000 people to live in the 50-block district known as Skid Row, a dystopian encampment where assaults and robberies run rampant.

What is the impact of drug use?

Drug abuse can be either a cause or a consequence of homelessness. Some people lose jobs and homes because of addiction, while others land on the street first and become drug abusers to blot out the shame and misery of their lives. That's why dealers brazenly target homeless encampments. In Seattle, city officials say that the majority of homeless people are hooked on opioids. Among the unsheltered, 80 percent are believed to have a substance-abuse disorder. In Los Angeles, some homeless people smoke crystal meth to stay awake at night so they can fend off thieves and assailants. San Francisco employs a crew to pick up used syringes 12 hours a day, collecting more than 140,000 in the past year.

What can be done?

Municipalities already are spending a lot of money on the problem. Private and public organizations in the Seattle metro area spend $1 billion each year fighting ­homelessness — nearly $88,000 for every homeless person. Last year Los Angeles spent $619 million to bring 20,000 people off the streets, largely thanks to a sales tax passed in 2017. A year earlier, L.A. voters overwhelmingly approved raising property taxes to generate $1.2 bil­lion for 10,000 new housing units. Willingness to spend, however, is half the battle. Building low-income housing always generates powerful "not in my backyard" opposition among existing homeowners, who fear it will hurt their property values. But without many more affordable apartments, homelessness can't be reduced. "Housing is an inescapable, unavoidable part of the solution," said Uni­ver­sity of Cal­­i­­for­­nia, San Fran­­­cis­­co professor Dr. Mar­got Kushel, one of the nation's top experts on homelessness. She says that is no less true for people with substance abuse or mental health problems. "It makes treatment so, so, so ­difficult — ­bordering on ­impossible — if people are living on the street."

The era of 'hostile architecture'

Business owners in Los Angeles are adopting aggressive tactics to keep the homeless away from camping out near their front doors. Some are putting large arrays of cactus plants, thorny rosebushes, and even metal spikes on the sidewalks. Peter Mozgo, operator of downtown L.A.'s Hungarian Cultural Alliance, says dozens of homeless people began congregating outside his building, which happens to be next to a food bank. Potential clients would tell him, "I'm sorry, I really like your place, but the street is unacceptable." So, without bothering to get a permit, Mozgo bought 140 large planter boxes, filled them with dirt, and arranged them around his building to prevent people from sleeping on the sidewalk. In cities plagued by street dwellers, "hostile architecture" is increasingly used to drive the homeless away: benches with extra armrests to prevent lying down, boulders placed under bridges, grates raised off the ground. Chris Homandberg, an activist for the homeless in L.A., says getting people "out of sight" does nothing to fix the problem. He cites a sidewalk outside a Catholic church where someone planted a thorny bush. "There's some metaphor there about a crown of thorns," he said.