
229 Cal.App.2d 602 (1964)
FAWN PRATT et al., Plaintiffs and Appellants,
v.
LEONARD ADAMS, as Supervising Building Inspector of Santa Cruz County, etc., et al., Defendants and Respondents.
Civ. No. 21781. 
California Court of Appeals. First Dist., Div. Three.  
Sept. 11, 1964.
 Robson, Malott & Pedder, and Arthur Lyle Robson, for Plaintiffs and Appellants.
 William H. Card, County Counsel, Robert C. Lenhard and Dennis J. Kehoe, Assistant County Counsel, for Defendants and Respondents. *603
 DEVINE, J.
 An unsuccessful attempt by appellants, landowners, to compel officers of the county, by writ of mandate, to issue permits to build residences on their property gives rise to this appeal.  [fn. *] The county defends its denial of the permits principally on the ground that its county code provides that building permits shall issue only when all pertinent laws and ordinances have been complied with, and that in this case the county ordinance passed in pursuance of the Subdivision Map Act has not been complied with, but violated. (There are other defenses, but because some of them, even if valid, probably are but temporary, and surmountable by appropriate action by appellants, and because our decision herein obviates the need of passing on them, we merely make this parenthetical reference.) Appellants readily concede that their actions, described below, have been directed to avoiding the provisions of the Subdivision Map Act, but contend the means have been quite legal. They say that the deliberate avoidance is comparable to skillful estate or business planning, within the law, to avoid inheritance or income taxes.
 Facts
 Appellants bought 46,237 acres, with the purpose of developing and dividing the land. The group decided that creation of a subdivision was not financially desirable at that time. Title was taken originally in the names of two husband and wife couples, in joint tenancy, but shortly afterwards they conveyed to all twelve members of the group, including themselves, as joint tenants. The next step, about three weeks later, was the filing of a partition action, in which one member of the group acted as plaintiff against all the others. A referee was appointed, and he presented a report in which he recommended that the parties hold various parcels of the land individually and free of joint tenancy obligations. In the case of the four husband and wife couples, separate parcels were to be held by each spouse in his or her own name. Thus, twelve parcels would be created. The referee also set up an elaborate plan for development of the area, with these features: a common roadway, not necessarily part of the county road system, to be maintained as a majority of the grantees should decide by vote; easements in favor of certain parcels against others; building restrictions, to be carried out by an architectural control committee; prohibition of signboards, *604 of trailers and of many kinds of animals; and provision for waiver of any of the restrictions by vote of a majority of the parties, their heirs, successors or assigns.
 On motion of plaintiff in the partition action, the court made an order confirming the referee's report, stating that the provisions contained therein "are hereby made the Order of the Court" and apportioning the referee's expenses equally among the parties. There was no further proceeding in the action.
 The next transaction, on January 11, 1963, was the division by the parties to the partition action of the 12 parcels referred to in the referee's report and order confirming it, into 38 parcels, no one of the 12 parcels being divided into more than 4 smaller ones. The time between the original purchase of the single parcel and the ultimate division into 38 parcels was about four months.
 During the operations of appellants, the Santa Cruz County Planning Commission held hearings on a proposed emergency zoning of appellants' land, and recommended that the premises be limited to single family residential use with a 3-acre minimum area. The county board of supervisors enacted the recommended zoning on January 14, 1963. However, section 13.04.300 of the County Code of Santa Cruz County provides that zoning shall not affect the right to build upon a lot "providing such was a separate lot or parcel of record or as shown on a Map of a recorded subdivision on the effective date."
 Issue
 Thus, the parties' positions are these: Appellants say that the application for building permit should have been granted, the granting being a ministerial act, because the zoning ordinance under which it was denied does not apply to appellants' lands, for they were separate lots or parcels of record as of the date of the zoning. Respondent county says that the lot or parcel must have been a legal lot on the effective date of zoning in order to acquire nonconforming status, and that appellants' lots were not legally created because: (1) the partition action was not followed through to judgment, but stopped with an order confirming the referee's report, and (2) the whole procedure followed by appellants was in violation of state and local subdivision laws.
 Decision
 Although it is debatable whether appellants did obtain a judgment in the partition action (the order is not denominated *605 a judgment, and it lacks the form of a judgment, especially that part of a judgment described in section 766 of the Code of Civil Procedure that "such partition be effectual forever"), we prefer to rest our decision on the broader ground.
 The Subdivision Map Act defines a subdivider as a "person, firm, corporation, partnership or association who causes land to be divided into a subdivision for himself or for others" (Bus. & Prof. Code,  11508); and a subdivision is defined as "any real property ... shown on the latest adopted county tax roll as a unit or as contiguous units, which is divided for the purpose of sale or lease, whether immediate or future, by any subdivider into five or more parcels" (Bus. & Prof. Code,  11535). The Santa Cruz County Code section 13.08.012 contains a similar definition. It is to be observed that appellants have purported to divide, within a few months, one parcel into 38 parcels, many more than the 5 parcels which would bring appellants into the category of subdividers, without complying with the subdivision laws. But, they say, we did not cause the division from 2 parcels to 12, for the court did this, in the partition proceeding, and surely the court did not contrive to violate the law. And the division into 38 parcels was done by twelve individuals, none splitting his land into more than 4 parcels and hence not being a subdivider, because the number of 5 parcels was not reached.
 These arguments are unimpressive. [1] The court, in the mandamus proceeding, found that the "evidence does not show that plaintiffs disclosed to the Court in partition action No. 33559, Superior Court, County of Santa Cruz, State of California, that the purpose in filing said partition action was to circumvent the state and local subdivision laws." One of the appellants set the partition in motion by filing the complaint; the others, represented by the counsel who also represented the plaintiff, and who is one of the members of the group and one of the parties to this appeal, stipulated to the interlocutory decree. Under the circumstances, it is fair to say that appellants "caused" the dividing of the land even though judicial approval of the referee's report was obtained.
 The subsequent division into 38 parcels was part of the general scheme to multiply the number of parcels. [2] The plan should be construed as a whole, not as if there were several transactions, each involving not more than 4 parcels.
 The Subdivision Map Act and the ordinances passed in conformity with it have several salutary purposes, such as: *606 to regulate and control the design and improvement of subdivisions, with proper consideration for their relation to adjoining areas (Kelber v. City of Upland, 155 Cal.App.2d 631, 638 [318 P.2d 561]; Newport Building Corp. v. City of Santa Ana, 210 Cal.App.2d 771, 776 [26 Cal.Rptr. 797]); to require subdivider to install streets (Hoover v. County of Kern, 118 Cal.App.2d 139, 142 [257 P.2d 492]; Evola v. Wendt Constr. Co., 170 Cal.App.2d 21, 25 [338 P.2d 498]; County of Kern v. Edgemont Development Co., 222 Cal.App.2d 874, 879 [35 Cal.Rptr. 629]; to require subdivider to install drains (City of Buena Park v. Boyar, 186 Cal.App.2d 61, 67 [8 Cal.Rptr. 674]); to prevent fraud and exploitation (10 Ops. Cal. Atty. Gen. 203, 204; 27 Ops. Cal. Atty. Gen. 66); and to protect both public and purchaser (38 Ops. Cal. Atty. Gen. 125, 128). (See Taylor, Current Problems in California Subdivision Control, 13 Hastings L.J. 344.)
 These purposes would be defeated if the courts were to recognize avoidance of the statutes by such use of an action in partition as was devised here. [3] Mandamus is an equitable remedy. It will not be used to compel the performance of acts which are illegal, contrary to public policy, or which tend to aid an unlawful purpose. (Cook v. Noble, 181 Cal. 720 [186 P. 150]; Sutro Heights Land Co. v. Merced Irr. Dist., 211 Cal. 670, 704-705 [296 P. 1088]; Smith v. Kraintz, 201 Cal.App.2d 696, 700 [20 Cal.Rptr. 471].) This is not a case in which a building permit has been denied because of some old violation of subdivision laws, possibly done by predecessors in title to the applicant; it is a case where the permit is sought as the culmination of a plan to circumvent the law by one of the planners. The courts will not assist, by equitable process, the fulfillment of this plan.
 Judgment denying writ of mandate is affirmed.
 Draper, P. J., and Salsman, J., concurred.
NOTES
[fn. *]  *. Technically, only one of the appellants applied for the permit, but the judgment indirectly affects all of them.
