I'm researching the same thing (attic space) here (Livermore, CA) and the thing I found I might run into with some roof configs is how it relates to the setback. They calculate this here with a 45 degree line running up from a point 6 feet high and 3 feet back. So a regular gable roof with a 12/12 pitch or less makes no difference as the top of the wall hits the line first, but a mansard (barn?) type roof is steeper than 45 degree for the first part, so would push the building further from the line to meet code.
Height-wise here they measure from the "pre-existing grade". Check your local city codes online.