Carlsbad is a coastal resort city located in the North County San Diego section of Southern California. The 2009 population was estimated by the California Department of Finance to be 104,652. Carlsbad was incorporated in 1952, in large part to generate sufficient funding to connect with the water pipeline running through San Diego County, but also to avoid being annexed by Oceanside. It is one of the highest-income places in the United States. The city has drafted ordinances protecting sensitive wildlife habitat, becoming one of the first municipalities in the State of California to do so. The city has also pledged to protect a specified amount of land within the city limits from development of any kind and spends significant funds to restore habitats destroyed by newer development projects. Carlsbad is located between the major cities of San Diego and Los Angeles. Its coastal location, scenic beauty, low population density, thriving commercial sector, abundance of upscale housing, and high performing school districts have made Carlsbad one of the most expensive housing markets in the United States. Land in Carlsbad is a premium; as such, real estate commands prices high even by Southern California standards, with median home prices in the $1 millions in 2007..