Image copyright Getty Images Image caption Tent camps have drawn sharp dividing lines through San Francisco society

Tent camps have become one of the most prominent and controversial symbols of San Francisco's problem with homelessness.

The camps have sprung up along streets and under overpasses, swelling in some cases to 30 or 40 tents. They have divided opinion in a city which has seen an influx of well-paid tech workers in recent years but struggled to house its poorer citizens.

Now a new ballot measure, backed financially by tech investors and to be voted on by residents next month, is proposing to introduce laws against the tent camps.

Proposition Q would give the city the right to tear down camps and remove residents' belongings. Police would have to give 24 hours notice and find a shelter for anyone they turf out.

Supporters say the measure prioritises housing over dangerous camp environments. Opponents say it is yet another move to criminalise the homeless.

Here's what you need to know about Prop Q.

How would it work on the street?

In theory, a police officer or other city worker would offer someone sleeping in a tent a room in a shelter for the night, or a paid bus ticket out of the city to a family member or friend, under the city's existing "Homeward Bound" programme.

If the homeless person refused, they would be given 24 hours notice to dismantle their tent and vacate the site. If they failed to comply, the city would remove the tent and store the owner's possessions for up to 90 days.

Who's supporting it, and why?

Image copyright Getty Images

Prop Q was drawn up and sponsored by Mark Farrell, a San Francisco city supervisor. Mr Farrell told the BBC that the camps had become "the symbol of the city's homeless problem" and were "some of the most dangerous places you can imagine".

"From documented rapes, to fires, to tonnes and tonnes of waste - these camps are a significant strain on our public safety resources," he said.

Mr Farrell and Prop Q's other advocates say no one will be moved on from a camp unless there is a guaranteed bed for them that night.

He said that allowing the camps to remain and providing water or other assistance would encourage homeless people to come to the city.

"If word got out... we would see a massive influx of tent camps in the city," he said.

Mr Farrell said he "completely rejected" the accusation that the law would criminalise the homeless. "This is about rejecting dangerous living environments and prioritising shelter and housing," he said.

So who's opposing it, and why?

Image copyright Getty Images

In the other corner is San Francisco city supervisor John Avalos, Prop Q's official opposition. Mr Avalos called Prop Q "a political move".

"Police already have all the powers they need to move encampments," he said in an interview. "This measure is on the ballot so voters can vote with their anger about homelessness."

He said the key to solving homelessness was to focus resources on supportive housing. "This measure does not do anything to increase supportive housing, it pushes people from sidewalk to sidewalk, from block to block, in the hope of housing that doesn't exist."

"This is kind of like a tough love measure," he said. "But we know from the past, they tend to operate on very little love and mostly toughness."

Media playback is unsupported on your device Media caption A mural in San Francisco's Mission District

Also opposing the law is San Francisco's Coalition on Homelessness charity. Jennifer Friedenbach, the charity's executive director, called it "an incredibly deceptive measure" and warned it would stir up hate against the homeless.

"It's already illegal for tents to be on the sidewalks," she said. "So it bears the question why put it on the ballot? The only reason is to have the homeless vilified to draw out more conservative voters."

Is homelessness particularly bad in San Francisco?

Image copyright Getty Images

Not exactly. San Francisco has a lower homelessness rate than many major US cities including LA, Seattle, and Washington DC.

But San Francisco does have a significantly higher proportion of unsheltered homeless people - 511 per 100,000 people, according to 2015 data from the city's Housing Department. That's more than five times the rate of unsheltered homeless than Washington DC, which has twice the overall rate of homelessness.

And San Francisco's homelessness rate is slowing growing, according to the Housing Department's biannual survey.

So presumably there aren't enough shelter beds?

One of the central arguments against Prop Q is that there aren't enough rooms in shelters to move people to, so the homeless will just get pushed around.

Mr Farrell says that a new so-called Navigation Centre under development, plus the city's existing sheltered housing, will total 1,500 rooms, against just 600 people believed to be in tent camps.

But opponents point to the total number of homeless in the city, thought to be at least 6,500 but possibly as high as 9,500, and say there is already a long daily waiting list for a room.

"We have over 800 people waiting for shelter," said Ms Friedenbach, "and the city would hold shelter beds empty in order to offer them to people in encampments, putting other elderly people and people with disabilities who are in those shelter beds out on the streets."

Is San Francisco tougher on homelessness than other cities?

Image copyright Getty Images

According to a 2015 study by California's University of Berkeley, the average city in the state has nine homelessness laws - significantly more than in other states. San Francisco has the most - 23 laws.

San Francisco's include so called "sit-lie" - a 2010 measure which bans sitting or lying on the sidewalk during daytime hours and is punishable by up to six months in prison.

And a 2015 measure against begging which set a 20ft perimeter around cash machines and made it illegal to ask for money again from someone who had refused.

That measure did also include provisions to get more homeless people into drug or mental health programmes instead of prison.

What's the funding controversy around Prop Q?

Image copyright Getty Images

According to a report by the Guardian, wealthy tech investors have donated significant amounts of money to the campaign for Prop Q. The newspaper reported that Sequoia Capital chairman Michael Moritz, tech angel investor Ron Conway, and hedge-fund investor William Oberndorf donated $49,999 each to a war chest totalling $270,000.

Mr Farrell said the campaign had also had large numbers of small donations from ordinary voters, but the news that rich investors putting up most of the funds has angered many.

"These are people who spend more money in a year than homeless people have for a budget for food for six years... I mean how awful to have a billionaire funding a campaign to take away people's tents," Ms Friedenbach said.

Finally, will it pass?

Anti-homelessness legislation has typically been popular among voters in San Francisco and proponents say they are confident of it passing. The measure needs more than 50% of the vote to pass. Voting is on 8 November.