New York City has achieved what many once thought was impossible: getting most of its homeless population off the streets and under a roof. New York now has only 6% of its homeless living outside, compared to 75% still on the streets in Los Angeles.

New York succeeded with a policy called "The Right to Shelter," which the state adopted in 1981, when tens of thousands of homeless were camped out in Manhattan's parks, subways and sidewalks. The Right to Shelter means New York must provide enough beds for every homeless person who requests one.

The Right to Shelter policy was mandated by a settlement of a landmark lawsuit, Callahan versus Carey, in which three homeless men sued New York City and state, saying they'd been refused emergency shelter.

"We had families with children on the streets, in all-night movie theaters. What was lacking was a comprehensive approach" to sheltering the homeless, says Steven Banks, New York's Commissioner of Homeless Services.

New York now has a comprehensive network of shelters and apartments that provide housing for all of the city's 63,000 homeless residents. When it needs extra beds, New York will even pay to put up the homeless in Holiday Inns and other hotels and motels.

Currently, New York City has only about 3,500 unsheltered homeless, about 5% of its overall homeless population. The city of Los Angeles, by comparison, has fewer homeless people overall -- an estimated 36,000 -- but 27,000 of them, roughly 75%, are living outdoors.

"At the end of the day, [it's] just a roof, four walls, some water. It's nice to be out of the elements, because the elements will tear you down," says Charmel Lucas, who stayed for months in a Holiday Inn Express paid for by New York.

Some prominent California politicians are now calling for the Golden State to emulate the Empire State.

"I want California to establish a legal imperative that everyone has a right to a roof over their head," says Sacramento Mayor Darrel Steinberg, who co-chairs the state's Commission on Homelessness and Supportive Housing.

Steinberg says it would take action by the legislature, or an executive order by Gov. Gavin Newsom, to establish a Right To Housing in California. And he admits it will cost billions of dollars to build housing for all of the state's 130,000 homeless people.

If that happens, Steinberg says California should take New York's policy a step further: The state shouldn't just build enough housing for the homeless; it should then obligate--force--them to use it.

But there are perhaps thousands of homeless in cities like Los Angeles who don't want to leave their lives on the streets, often because of drug addiction or mental illness.

"Nobody's gonna stop me. If they stop me, they can put me in jail," says Kirk Quamme, who has lived for months in a tent behind Melrose Avenue and tells the I-Team he'll resist anyone who tells him to stop living on the streets.

"If they come up and say that, I'm gonna say, 'kiss my ass,'" Quamme says.

Would cities like LA actually use force to compel the homeless to live indoors? Politicians like LA Mayor Eric Garcetti won't say.

"I don’t know. When we get to that place, that’s a conversation we need to have," Garcetti told NBCLA.

New York’s Right To Shelter policy has come under constant criticism, including from New York Mayor Bill De Blasio.

Many say New York doesn't have enough permanent housing for the homeless, so many get stuck in temporary housing too long. And it can cost the city a lot to house the homeless in hotels and motels; the bill can be over $7,000 a month per person.

"We don't want to replicate the New York model," says Sacramento Mayor Steinberg. "I think we can do it much better than New York."