Whether a group of homeless people in Oakland have a constitutional right to camp on a fenced-off piece of vacant land owned by the city will soon be decided by a federal judge.

In late October, the homeless group and their advocates erected the Housing and Dignity Village at Clara Street and Edes Avenue, about a mile and a half southeast of the Coliseum.

The move was a continuation of a fight that began in January 2017 when some of the same people took over Grove Shafter Park in North Oakland before the city kicked them off the property.

City officials accused them of breaking a lock to access the East Oakland site and trespassing as an Occupy Oakland-style force, and ordered them to leave. But two weeks ago, U.S. District Judge Haywood Gilliam Jr. granted their request for an order that has temporarily barred the city from carrying out the eviction.

Some members of the encampment had been working with the Oakland officials to find a location for a city-sanctioned version of what they had already set up on their own: a “clean and sober” place primarily for homeless women and families.

The city says this particular site is not appropriate because of its proximity to a preschool, elementary school, senior center, community sports center and library.

The two sides had identified a spot on Miller Avenue — where a historic library stood before it burned down — for the “managed” encampment, when the alleged trespassing occurred. Now both parties are questioning whether they can work together; Gilliam on Monday suggested that a magistrate judge could step in to help resolve the squabbling.

At a hearing Monday in Oakland, Gilliam said that he would issue a ruling in the next day on the group’s motion for an injunction that would continue to prevent the city from evicting those in the encampment.

The homeless individuals and their lawyers say removing them from the parcel would violate their Eighth Amendment protection from cruel and unusual punishment and Fourteenth Amendment right to due process. They said their situation was nearly identical to a case in Boise, Idaho, in which the Ninth U.S. Circuit Court of Appeals in San Francisco ruled that cities can’t criminalize sleeping on a public street or sidewalk when no homeless shelters are available.

Yet Oakland Deputy City Attorney Jamilah Jefferson said the city has identified shelter beds for the 13 people living at the site — six of whom are part of the litigation — and that if they are allowed to stay where they are, the city could be held liable for any harm that results from potential hazards.

“There was available shelter. There is available shelter. Plaintiffs are just not availing themselves of the shelter,” Jefferson told the judge. “There’s no constitutional authority that would require a city to allow an encampment to remain on city property.”

Unlike the case out of Idaho, Jefferson said, Oakland officials are not planning to arrest or cite the individuals.

Joshua Piovia-Scott, an attorney for the homeless group, said there’s little difference between sleeping on a publicly owned sidewalk and sleeping on the city-owned parcel, except that the latter is safer and not being used for anything.

“How is the city able to come up with beds for these 13 but not the thousands of others on the streets?” Piovia-Scott said in court. “These are people who don’t have anywhere else to go.”

The land in question was previously home to a liquor store, which Oakland officials called a crime hub and eyesore. The city acquired the half-acre of land in 2008 and demolished the shop. Not long after, the site was slated for development as a nursing facility, but financing fell through, and now it is being considered for an affordable-housing project.

Kimberly Veklerov is a San Francisco Chronicle staff writer. Email: kveklerov@sfchronicle.com Twitter: @kveklerov