The boundaries of San Francisco city and county are as follows:
Beginning at the southwest corner, being the northwest corner of San Mateo, in the Pacific Ocean, on the extension of northern line of T. 3 S., of Mount Diablo base; thence northerly along the Pacific Coast, to its point of intersection with the westerly extension of the low-water line on the northern side of the entrance to San Francisco Bay, being the southwest corner of Marin and northwest corner of San Francisco; thence easterly, through Point Bonita and Point Cavallo, to the most southeastern point of Angel Island, all on the line of Marin; thence northerly, along the easterly line of Marin, to the northwest point of Golden Rock (also known as Red Rock), being a common corner of Marin, Contra Costa, and San Francisco; thence due southeast four and one-half statute miles to a point established as the corner common to Contra Costa, Alameda, and San Francisco; thence southeasterly, on the western line of Alameda County to a point on the north line of T. 3 S., R. 4 W., M D. B. & M.; thence westerly on the township lines and an extension thereof to the place of beginning. The islands known as the Farralones (Farallons) are a part of said city and county.
Ca. Gov. Code § 23138