SAN JOSE, Calif. — Everything in the warehouse mattered, at some point, to someone. A ceramic urn sprouting peacock feathers. A tool chest held together with duct tape. An oak table. A purple bike.

SAN JOSE, Calif. — Everything in the warehouse mattered, at some point, to someone. A ceramic urn sprouting peacock feathers. A tool chest held together with duct tape. An oak table. A purple bike.

Separated out from piles of trash during homeless encampment sweeps, the items were bagged, tagged and inventoried. In the seven weeks since San Jose started photographing and storing such belongings, no one has come to claim them.

The city, faced with the specter of costly litigation, has embarked upon a difficult experiment — one that is playing out across California as fiscally strapped cities struggle to balance the health and safety of the general public with the property rights of growing ranks of homeless people.

Instead of shoveling the detritus into garbage trucks and hauling it away, workers here have begun salvaging uncontaminated items and holding them for 90 days. But the process has raised some tough questions: What is trash? What is a hazard? Who decides? Where do you store such things? How do you pay for it?

And if San Jose — with an estimated 4,000 to 5,000 homeless residents — is struggling for answers, how can Los Angeles manage with a homeless population nearly five times that size?

"We're learning as we go," said Cheryl Wessling, spokeswoman for the San Jose Environmental Services Department. "We're trying to address the human element, the environmental element, water quality issues. The tensions are tough."

Officials frustrated with health and safety hazards are cleaning out encampments in places as varied as the banks of San Jose's Guadalupe River, the sea caves along the Santa Cruz coast and the 50 dense blocks of Los Angeles' skid row. The number of laws banning camping, loitering and begging in public continues to grow.

Homeless advocates call it the "criminalization" of poverty. The solution, they say, is housing, not prohibitions on sleeping outdoors or sweeps that destroy people's belongings. An April report by the U.S. Interagency Council on Homelessness said cities set themselves up for lawsuits when they take such measures.

In fact, Fresno, Calif., settled a class-action lawsuit in 2008 for $2.3 million, brought on behalf of homeless residents who said city workers had bulldozed their property — including a disabled woman's wheelchair and a litter of 10 puppies — and thrown it out like rubbish.

The city also instituted procedures to protect such belongings during later sweeps. But 32 lawsuits have been filed against Fresno since March, all arguing that the Central Valley city has begun destroying people's property without adequate notice again. Officials have denied the charges.

In Los Angeles, a federal judge last year imposed restrictions on the removal of items left unattended on skid row sidewalks following complaints from homeless residents.

Retired Judge LaDoris Cordell, head of San Jose's office of the independent police auditor, was well aware of Fresno's legal travails — and wasn't about to let the same conflict tear at her city.

Last fall, Cordell began receiving complaints that officers were acting as "enforcers" while cleaning crews scooped up birth certificates, prescription medications and sleeping bags along with trash from homeless encampments.

A former truck driver named Chester, who was living on the banks of Coyote Creek with his girlfriend, said he was the first to call.

Every Thursday, he said cleaning crews would come by to clear out trash. And every Thursday, Chester and Christine would break camp and hide their belongings before the workers arrived.

Then, last July, the crews came on a Wednesday.

"It's just a feeling I can't describe, going over there and seeing everything, everything you had gone," said Chester, who requested that his last name not be used. "We lost our tent, four sleeping bags, a bunch of blankets, our food bins ... our gas stove, two library books that I have to pay for now. ... I filed a complaint through the judge."

After hearing from others who lost critical belongings, Cordell asked the police chief if one of her staff members could accompany police on their next sweep.

The staffer photographed six hours of cleanup, images that showed encampments filled with belongings, all of which ended up in big white garbage trucks. It troubled Cordell so much that "I contacted the police chief, the city manager and I think the city attorney's office and said, 'Can you all come over and talk to me?'"

Cordell also dug up a long-forgotten, 1990 memo from the then-San Jose city attorney that outlined the proper treatment of belongings. The meeting resulted in the procedures San Jose reinstituted last spring.

Rather than simply posting notices 72 hours ahead of a sweep, the city has social service providers begin visiting targeted areas 30 days in advance to talk about food vouchers, housing opportunities and jobs.

Then city workers go out and decide what to save.

"Somebody's clothing that's on the ground and in the dirt would be deemed trash," Wessling said. "If they have dirty clothes packed in a suitcase or a box, that would be a belonging. ... Then we gather it all up and we bag it and we bring it to the facility — and no one calls for it."

On Los Angeles' skid row, the difficulties are exponentially bigger. More than 1,400 people make their beds on any given night on the neighborhood's dangerous streets.

For the past year, city officials said, they struggled to figure out how to comply with the federal injunction, which among other things required that seized belongings be stored for 90 days. Officials feared that they didn't have a space big enough to hold the bags, clothing and furniture they'd be picking up. Trash, urine and feces built up among piles of possessions left undisturbed on the streets. Vermin multiplied in the makeshift encampments.

The city recently found a large storage space in a municipal building within walking distance of skid row, and launched a 13-day cleanup. In the end, space was not a problem.

With the operation looming, notices were posted and homeless service providers canvassed the streets, asking people to remove their belongings. The city also provided 500 extra storage bins at the Check-In Center, a free service offered by the Central City East Association business improvement district. The facility has won praise for providing a safe place for homeless residents to keep their things.

By the time the center opened its doors one recent morning, about a dozen people were already waiting in line. Inside, the trash cans-turned-storage bins were lined up wall to wall, each containing fragments of a former life: family snapshots and legal papers, a pair of wingtip shoes, a favorite CD.

Jerome Reid showed up to collect clean clothes. Laid off from a cleaning job and homeless for more than a year, he has been trying to get his life back together.

"It's a tremendous help," he said, "not having to carry your stuff around all day long."

Martina Mendoza was thrilled to snag a bin to store the vibrant prints and canvasses she hopes to exhibit one day. She was terrified of losing her artwork when she moved into a shelter. Most don't have room to store all of their guests' belongings. Thefts are common.

"It's really difficult being out here on the streets," she said.

Staff members expect the bins to fill up fast. But not all skid row residents trust the Check-in Center.

"They take all your stuff and put it into big trash cans," said Barbie Carter, wrinkling her nose. "Anything they think you shouldn't have, they throw away."

Carter, a bony woman who wears pink boots and a black cowboy hat, had turned a stretch of San Julian Street into a makeshift apartment. There was a narrow bed made of packing crates, a collection of purses arrayed on a fence and a dusty copy of "To Kill a Mockingbird."

When city crews arrived to clean her block, Carter wasn't about to surrender her spot on the sidewalk.

"Stop calling my stuff trash," she yelled. "I refuse to be homeless, so this is my home."

Two years ago, Carter said, police had seized most of her belongings.

"They left me with my (American) flag, my purse and my hat," she said. "Everything from my previous life, gone."

Patrick Butler, an assistant chief with the Los Angeles Fire Department, explained to the tearful woman that this move would be temporary and that she could return — after the block had been pressure-cleaned, disinfected and swept.

Carter began loading her three shopping carts with food, blankets, clothing, a wooden chair, a pair of crutches and the handbags. For nearly two hours the cleaning crews worked around her. When she was ready, neighborhood activists helped her roll her belongings around a corner.

Later, she thanked the crew for giving her the time she needed. "I really appreciate it," she said.

The pressure washers and sweeper trucks moved in. The next block over, which had been cleaned just days before, was once again filling up with suitcases, shopping carts and discarded food containers.