A number of layouts I’ve been involved with here in the bay area are built with foam, so it’s possible to buy it with a little effort. Pacific Supply in the East Bay is one source, already noted earlier in the thread. They also have a branch in South San Francisco
Pacific Supply
1675 Mission Rd
S San Francisco, CA 94080
(415) 285-1010
They don’t stock the foam in S. SF, but will order any amount of the Dow (blue) foam with no minimum.
I’ve posted this dealer-finder info before, but it might be worth doing so again.
When using either of these dealer finder methods, be aware that many dealers they list do not actually stock the material, so you must phone first! In particular, they will list many Home Depot stores which do not have the stuff in stock. Phone first, then drive.
Dow (maker of the blue foam) has a phone number for locating large dealers:
(866) 583-2583
In my experience, they often will not have a large dealer to whom they sell directly in warm-weather areas, so they refer you to nationwide distributors, who in turn will refer you to a dealer. Call the dealer names they give you first, before driving.
By the way, Dow has a dizzying variety of blue foam products. The standard stuff that most people use for model railroading applications is called “Styrofoam Square Edge”.
http://www.dow.com/styrofoam/na/res-us/products/square_edge.htm
Owens-Corning makes the pink foam, which they call Foamular. Their dealer finder is online:
http://www.owenscorning.com/around/locator/StoreInfo.asp
Did I mention to call first, then drive? Again, the dealer-finders will list many big-box home supply stores, but in warm-weather areas, most of these do not