D was cited for violation of the city's anticamping ordinance. The court determined D could not present a necessity defense to a jury. D had offered to prove that every shelter bed within the city that was available to a homeless single man with no children was occupied and that he was involuntarily homeless, i.e., he had done everything he could to alleviate his condition. D, a 14-year resident of Santa Ana, had been unable to find work as a manual laborer that paid enough to allow him to find an alternative place to sleep. Trial commenced without a jury. Officer Carol Craig testified that D said he had tried the Armory some time ago and it was full, so he never returned. The court judicially noticed that the walk between the civic center and the armory was 'through very dangerous areas of town.' Police photographed and cited D, then asked him to move on. He complied. James Meeker, a professor at the University of California, testified that there were more than 3,000 homeless who had lost jobs and could not afford housing. The county had relatively little affordable housing. Single men had a particularly difficult time. Most were sleeping outdoors because they had no other choice. Homeless individuals were 10 times as likely to be victimized by crime than the average population. Many homeless stayed in urban areas because of proximity to assistance providers (food, clothing, and shelter), day jobs (just 8 percent were unemployed and not looking for jobs), public facilities (restrooms, etc.) and the lack of transportation. Timothy Shaw was the executive director of the Orange County Homeless Issues Task Force pegged the number of homeless at about 1,500 persons with about 118 shelter beds available for single men. The armory could accommodate 125 persons during the winter. These shelters were full on the night D was cited. On January 25, the armory was 13 persons over capacity, which was not uncommon. Only those 'at risk' (e.g., women and children) would be admitted after the maximum was reached, and generally only when it was raining. D, 49 years old, and when he worked and could save enough, he would live in a motel. He also relied on general relief and food stamps. Most of the less expensive motels had been torn down. If he could not get into a shelter, D would sleep in the civic center, where he was close to services (including restrooms) and where there was 'safety in numbers' (i.e., where it was less likely someone would steal or attack him while he slept). D loved to work and did so every chance he got. D did not like living outside. D had been turned away from the armory in the past and had a 'nervous walk' back to the civic center. D was in his sleeping bag, listening to his radio when Craig arrived around 10:30 p.m. D denied a problem with alcohol or drugs. The court found D had violated the ordinance and was not involuntarily homeless. The court ordered him to perform 40 hours of community service. The appellate department affirmed the conviction without opinion. D filed this petition for habeas corpus