A federal judge has dismissed some claims in a lawsuit challenging Portland's anti-camping ordinance, but allowed others to continue.

The ruling by U.S. District Judge Ann Aiken means the case stays alive.

Aiken, in ruling on the city's motion to dismiss the lawsuit, rejected claims that the ordinance violated the plaintiffs' right to travel, but allowed the claim that the ordinance violated their constitutional right against cruel or unusual punishment.

The suit seeks suspension of the city's anti-camping ordinance that prohibits camping on any public property or right-of-way and an ordinance that prohibits setting up any kind of structure on public property without a permit.

The class-action suit was filed in U.S. District Court in Portland by the Oregon Law Center, a nonprofit legal aid organization, on behalf of four homeless Portlanders and "all others similarly situated."

The suit alleges that police officers have arbitrarily moved homeless people from place to place, excluded them from parks and cited them for camping and trespassing, even though they can't obtain housing or adequate shelter in Portland. They also have been cited by police for gathering their belongings under tarps and in bike trailers.

"Punishing homeless people for sleeping outside is placing the burden of the lack of sufficient housing squarely on the shoulders of those who can do the least to remedy this problem," the suit says.

The city argues that the ordinances are aimed at conduct and not the status of being homeless, but the judge ruled that the plaintiffs could present evidence that the city has criminalized being homeless, citing a U.S Supreme Court decision that threw out a Los Angeles ordinance that made it a crime to be a drug addict.

The judge also allowed the plaintiffs to present evidence that the city violated their right to equal protection of the law in singling out homeless people.

The judge rejected a claim that the ordinance violated the plaintiffs' right to travel to and around Portland, noting that the city has no policy or program of excluding homeless people from certain areas.