San Francisco’s latest attempt to stop homeless camps from sprouting on public land takes the form of dozens of boulders plopped down under a maze of freeway ramps.

It hasn’t worked. At least not yet.

What it has done, though, is generate two reactions typical of such measures. It’s angered advocates for homeless people, who call the boulders an example of government money being spent to shove indigents around. And it’s encouraged those who want the mess of homeless camps removed from their neighborhoods, and hope the city will take a harder line.

The boulders were sprinkled a couple of weeks ago under Highway 101 near Cesar Chavez Street, in a longtime encampment area called “the Hairball.” San Francisco officials say the rocks are a humane way of discouraging people from re-establishing a trouble-prone camp that city workers cleared out a month ago.

However, the homeless people the boulders were intended to dissuade simply moved their tents a few feet away. Most of the rocks stand a few feet high, and at about 400 pounds are too heavy to move easily. But there is plenty of space left between them for sleeping bags — and plenty of Hairball ground beyond that for pitching tents.

“Not sure why they thought this would stop us, but it didn’t,” James Ayres, 36, said Thursday as he stood outside his tent at the Hairball, on a dirt field about 50 feet from a cluster of boulders. “Maybe they’ll put more out here. I don’t know. They’ve got lots of money to do it.

“But for now, you could camp right between them if you want. I mean, really, it’s kind of funny.”

Kelley Cutler, outreach counselor with the San Francisco Coalition on Homelessness, called the big rocks an “offensive” example of “anti-homeless architecture.”

Randy Quezada, spokesman for the city Department of Homelessness and Supportive Housing, said insensitivity to the plight of homeless people was the last thing on the minds of those trying to prevent camps from forming.

“Is it cruel to try to prevent a dangerous encampment from re-forming? No,” he said. “Our focus is on everyone getting to a safe place. Encampments are dangerous — bad things happen to the people in them.

“They are victims,” Quezada said of homeless people who live in camps. “It’s better for them to be housed or in a shelter. Not in a camp.”

This dynamic has played out for decades, from resentment when benches at Civic Center Plaza were removed in the 1990s to keep people from sleeping on them, to sprinklers being installed at St. Mary’s Cathedral doorways in 2015 where homeless people slept. The sprinklers were taken out after a public outcry, but the benches have never come back — and many benches around the city, particularly at bus stops, are now designed to make them tough to stretch out on.

Ideally, say homeless advocates and resentful locals alike, there would be enough housing and poverty aid to lift the poorest from the streets and away from camps. But with 7,500 homeless people in San Francisco and not enough affordable housing for them all, what’s left are temporary fix-it moves like taking out benches and installing boulders.

Now Playing:

“You can put in stuff like boulders, but the people are going to go somewhere. They’re not going to disappear,” said Sam Davis, a UC Berkeley professor emeritus of architecture who specializes in designs for homeless situations. “The only answer is we have to have more housing, period.”

Well-designed shelters or Navigation Centers help by supplying a temporary roof, but until there are enough permanent homes there will always be a back-and-forth conflict between those who want camps moved and those who argue for leaving them alone.

“That’s just the way it is,” Davis said.

In the meantime, there are places like the Hairball. It has long been popular with homeless people because it is set away from houses but easy to get to, and because the freeway ramps keep the rain out. However, many of those living there were heroin or methamphetamine addicts with acute medical needs, and in November, city outreach counselors, police and Public Works crews cleared the camp.

Usually, the city tries to keep camps from re-forming by erecting metal barriers and adding police patrols. The boulders that Public Works installed at the Hairball cost a total $9,000, and the department intends to add more.

The price of that one load of boulders, said a department manager, is equivalent to what Public Works spent weekly just cleaning up the mess Hairball campers left before they were cleared out.

“This is about public safety and public health, both of which were problematic at that area,” said Larry Stringer, deputy director at Public Works. “The idea was as much as to make it difficult to get in with a bunch of stuff as it was to fill up spaces. And we’ll do more.”

He conceded that an end to the arguments over such steps is unlikely until there is enough housing.

“We don’t like doing a lot of moving either, but there is a certain level of frustration from residents,” Stringer said. “You have to respond. You do the cleaning, they wait and then they come back. Happens over and over.”

Jeff Nguyen, owner of the Chevron gas station across the street from the Hairball, said he was encouraged that the city cleared the camps away. But he still has needles and feces and other messes in front of his business.

“They come and they go, year after year, and moving that camp didn’t really do all that much good for me,” he said. “I wish there was a solution that was good for everyone — us, the homeless, the city.”

Cutler of the Coalition on Homelessness likened the boulders to other techniques meant to keep campers away from certain places — like loud music being played all night in doorways or bolt cutter-resistant fences installed under freeway overpasses.

“The boulders are the same stuff with a new coat of paint,” Cutler said. “Everyone seems shocked about it, but I’m like, ‘Really?’ This is the just status quo.

“Look around at all the walls, sprinklers, short benches — or even in London, spikes put up to keep homeless people away,” she said. “There’s a whole field of study on anti-homeless architecture, and every once in a while it catches people’s eyes. But it’s always there.”

Kevin Fagan is a San Francisco Chronicle staff writer. Email: kfagan@sfchronicle.com Twitter: @KevinChron