
133 Cal.App.3d 1042 (1982)
184 Cal. Rptr. 479
LIGHTWEIGHT PROCESSING COMPANY, Plaintiff and Appellant,
v.
COUNTY OF VENTURA et al., Defendants and Respondents.
Docket No. 64283.
Court of Appeals of California, Second District, Division Four.
July 20, 1982.
*1043 COUNSEL
Lucking, Bertelsen, Bysshe, Kuttler & Smiley and William A. Lucking, Jr., for Plaintiff and Appellant.
Dorothy L. Schechter, County Counsel, and Andrew B. Gustafson, Assistant County Counsel, for Defendants and Respondents.
OPINION
McCLOSKY, J.
Appeal from a judgment (order of dismissal) after the trial court sustained respondents' demurrer to appellant's complaint for declaratory relief without leave to amend and dismissing the action.
*1044 Appellant filed a complaint for declaratory relief alleging the following:
Appellant owns a surface mining operation for the mining and quarrying of native clay material used in the building trade. The business has operated for over 35 years on leased land. Three parcels of land involved in the case at bench are denominated as follows: The Grant parcel which appellant wishes to lease from the Grant Land Company; Rocklite parcel 2 (parcel 2) which is already leased to appellant and Rocklite parcel 1 (parcel 1) which is also leased to appellant and is situated somewhat between and partially adjacent to both parcel 2 and the Grant parcel. Appellant had mined and quarried the earth on parcel 1, and its manufacturing plant is located on that parcel. It now wants to mine and quarry the clay material from the Grant parcel and to process the material at its plant on parcel 1. Upon doing so it proposes to give up its right to mine and quarry the now undeveloped parcel 2, and to "move its mining operations away from the immediate vicinity of a residential neighborhood, some of the occupants of which have in the past complained of noise and dust incident to [appellant's] mining operation."
Attached to the complaint and incorporated in it as an exhibit was a judgment on stipulation for judgment in Ventura County Superior Court action No. 70523,[1] decreeing that appellant had a vested right, under Ventura County's zoning ordinances, to mine and operate on leased parcels 1 and 2 and to process the material therefrom in its plant on parcel 1 without a conditional use permit (CUP), as a valid and subsisting integrated nonconforming use which long predated the applicable existing county zoning provisions; that mining material from the Grant parcel, and processing that material in appellant's plant on parcel 1, would not terminate or diminish appellant's vested right to continue operating on parcel 1 as a nonconforming use. It provided, however, that if appellant applied for and was granted a CUP to allow mining operations on the Grant parcel, and if it commenced operations thereon, appellant would thereupon automatically be deemed to have waived and *1045 abandoned any and all rights it currently had to mine and process material from parcel 2. It enjoined the mining, quarrying or removal of materials from parcel 2 pending the processing and possible judicial proceedings regarding such CUP. It further enjoined the use of appellant's processing plant for the processing of raw materials "other than those it had mined, excavated and/or quarried within the boundaries of ... parcels 1 and 2 and/or the Grant Parcel unless and until [it] had obtained permission and approval for importation of any such raw material from offsite in full compliance with all provisions of the then effective Ventura County zoning ordinances."
Appellant applied for a CUP to mine and quarry the clay material from the Grant parcel. Respondent, Director of the Ventura County Resource Management Agency, determined that the California Environmental Quality Act (CEQA) requires that an environmental impact report (EIR) be prepared with respect to both the Grant parcel and parcel 1, the latter parcel being one which appellant maintains he had a present vested right to mine and operate. Appellant then appealed successively and unsuccessfully to the environmental report review committee and to the Ventura County Board of Supervisors. Both appeals were denied and appellant alleges that it thus exhausted its administrative remedies.
By its complaint, appellant seeks a declaration of the rights and duties of the parties under the CEQA; that appellant's activities with respect to the proposed mining of the Grant parcel and processing of the mined material in its plant on parcel 1 are exempt from the EIR process; that respondents have no right to require that appellant obtain an EIR, either as to its mining of the Grant parcel or the processing of the Grant parcel materials on parcel 1.
The court sustained respondent's general demurrer without leave to amend on the ground that the requested declaration relates only to the propriety of an administrative decision which is reviewable only in administrative mandamus. (Code Civ. Proc., § 1094.5.) In support of its conclusion the court took judicial notice of article VIII of the county's revised administrative supplement to the State Resources Agency Guidelines for Implementation of California Environmental Quality Act of 1970 and held that the administrative decision to which the complaint relates was rendered as a result of said article VIII which it held requires that in such proceedings a hearing shall be given, evidence *1046 shall be taken and discretion in the determination of facts shall be vested in the administrative agency.
The trial court concluded that the complaint therefore failed to state facts sufficient to constitute a cause of action for declaratory relief, and held that viewed as a petition for administrative mandamus the complaint failed to state a cause of action because it does not contain allegations of facts tending to show that the agency acted in excess of its jurisdiction, that there was no fair trial of the factual issues, or that there was any abuse of discretion. The appeal followed.

CONTENTIONS ON APPEAL
Appellant raises the following contentions: (1) that administrative mandamus is not the exclusive procedure by which erroneous governmental action may be challenged under the CEQA; (2) that the California cases expressly permit actions other than administrative mandamus to challenge the validity of governmental action on CEQA grounds; (3) that as a matter of law appellant is exempt from an EIR affecting or concerning operation of its plant on parcel 1; (4) that processing of substituted material from the Grant parcel in appellant's plant is not an expansion or extension of existing uses, nor is it an addition or enlargement thereof, nor is it a "change"; (5) that for purposes of considering a general demurrer, all properly pleaded allegations in the complaint must be deemed admitted; (6) that substitution of materials from the Grant parcel for materials from parcel 2 does not constitute a "project" within the purview of CEQA; (7) that processing of Grant parcel materials in the plant on parcel 1 is categorically exempt as a class 1 existing facility; and (8) that mining the Grant parcel is categorically exempt under the law as a class 2 replacement or reconstruction.
Respondents frame the following issues on appeal: (1) that the complaint fails to state a cause of action for declaratory relief because the requested declaration relates to the propriety of an administrative determination which is reviewable only in administrative mandamus pursuant to Code of Civil Procedure section 1094.5; (2) that viewed as a petition for administrative mandamus, the complaint fails to state a cause of action because it contains no factual allegations tending to show that the actions of the administrative agencies were in excess of jurisdiction, that there was not a fair trial of factual issues, or that there was any abuse of discretion; and (3) that CEQA, as a matter of law, requires *1047 the preparation of an EIR covering both the proposed mining operations on the Grant parcel and the related operations on parcel 1 as a condition precedent to the issuance of a CUP to mine the Grant parcel.

DISCUSSION
(1) A judgment of dismissal after a demurrer has been sustained without leave to amend will be affirmed if proper on any grounds stated in the demurrer, whether or not the court acted on that ground. (See E.L. White, Inc. v. City of Huntington Beach (1978) 21 Cal.3d 497, 504, fn. 2 [146 Cal. Rptr. 614, 579 P.2d 505]; Weinstock v. Eissler (1964) 224 Cal. App.2d 212, 225 [36 Cal. Rptr. 537].) (2) A general demurrer searches the complaint for all defects going to the existence of a cause of action and places at issue the legal merits of the action on assumed facts. (See Banerian v. O'Malley (1974) 42 Cal. App.3d 604, 610-611 [116 Cal. Rptr. 919]; 3 Witkin, Cal. Procedure (2d ed. 1971) Pleadings, § 802, p. 2415.) With these principles in mind, we consider the sufficiency of the complaint.
(3) Does the requested declaration relate to the propriety of an administrative decision which is reviewable only in administrative mandamus pursuant to the provisions of Code of Civil Procedure section 1094.5?
To answer this question we turn first to the provisions of the CEQA (Pub. Resources Code, §§ 21000-21176). Public Resources Code section 21168 expressly makes Code of Civil Procedure section 1094.5 applicable to, "[a]ny action or proceeding to attack, review, set aside, void or annul a determination, finding, or decision of a public agency, made as a result of a proceeding in which by law a hearing is required to be given, evidence is required to be taken and discretion in the determination of facts is vested in a public agency, on the grounds of noncompliance with the provisions of [the CEQA]...." (Italics added.) This provision, however, is merely declaratory of the pertinent and almost parallel provisions in Code of Civil Procedure section 1094.5.
We must, therefore, initially determine whether such a public hearing was actually required by law in this case. If it was, it triggers the necessity of a review solely by administrative mandamus. There is no provision in the CEQA itself which specifically requires a public hearing in connection with the preparation and filing of an EIR. (See Deering, Cal. Administrative Mandamus (Cont.Ed.Bar. Supp. 1981) Practice *1048 Book, § 2.7A, p. 14.) Nevertheless, a relevant local ordinance can constitute the type of law which by its terms requires the type of public hearing described in Public Resources Code section 21168 and Code of Civil Procedure section 1094.5, and thus compels the use of administrative mandamus as the sole remedy. That was the situation, for example, in Rapp v. Napa County Planning Com. (1962) 204 Cal. App.2d 695 [22 Cal. Rptr. 643], wherein administrative mandamus was used to challenge the action of a local planning commission in denying a use permit for an excavation project by a quarry after hearings and evidence before the planning commission. (See also Gong v. City of Fremont (1967) 250 Cal. App.2d 568, 573 [58 Cal. Rptr. 664].)
In the case at bench, the trial court in its order sustaining the demurrer concluded that the propriety of the administrative decision could only be reviewed by administrative mandamus because the administrative decision to which the complaint relates was rendered as a result of proceedings governed by article VIII of the County of Ventura administrative supplement to the State Resources Agency Guidelines for Implementation of the CEQA, as revised by the Ventura County Board of Supervisors, and that article VIII requires a hearing in such proceedings, the taking of evidence, and the exercise of discretion by the agency in the determination of facts.
Our review of the provisions of article VIII, however, does not reveal the existence of an ordinance which requires a hearing wherein "evidence is required to be taken and discretion in the determination of facts is vested in a public agency...." (Pub. Resources Code, § 21168; see also Code Civ. Proc., § 1094.5, subd. (a).) Article VIII is entitled "Appeal Process" and provides in pertinent part as follows: that "[a]nyone concerned with a particular project's environmental consequences may appeal an administrative decision made during the environmental review process for that project"; that "[t]he appellant has the responsibility for providing the specific factual justification upon which to base an appeal"; that "[t]he determination of the Environmental Report Review Committee (ERRC) regarding the adequacy of environmental documents may be appealed to the Board of Supervisors"; and that the Environment Resource Agency "will schedule appeal hearings and provide appropriate materials to the appellant, and the general public will be given timely notice of appeal hearings."
While, as noted, article VIII states that "appellant has the responsibility for providing the specific factual justification upon which to base *1049 an appeal," the same could be said of an appellant in a nontrial type of hearing. Even if the article VIII appeal process allows the taking of evidence, nothing in article VIII indicates that "evidence is required to be taken." (Pub. Resources Code, § 21168; Code Civ. Proc., § 1094.5, subd. (a).) Since the taking of evidence is not "required" in the case at bench (Keeler v. Superior Court (1956) 46 Cal.2d 596, 599 [297 P.2d 967]), administrative mandamus is not available, just as administrative mandamus would not be available if the ordinance provided only for a discretionary hearing. (E.g., Royal Convalescent Hospital, Inc. v. State Board of Control (1979) 99 Cal. App.3d 788, 792 [160 Cal. Rptr. 458]; Mahdavi v. Fair Employment Practice Com. (1977) 67 Cal. App.3d 326, 334 [136 Cal. Rptr. 421]; see also 1 Davis, Administrative Law Treatise (1958) § 7.01.)
Where administrative mandamus is not required as the sole remedy, an attack on governmental action on CEQA grounds can be brought and considered, as in the case at bench, in an action for declaratory relief. (Cooper v. County of Los Angeles (1975) 49 Cal. App.3d 34 [122 Cal. Rptr. 464, 76 A.L.R.3d 1210], appeal after remand (1977) 69 Cal. App.3d 529 [138 Cal. Rptr. 229].)
We accordingly conclude that the complaint stated facts sufficient to constitute a cause of action. This conclusion makes unnecessary any discussion of the other contentions of the parties.
The judgment (order of dismissal) is reversed.
Kingsley, Acting P.J., and Amerian, J., concurred.
NOTES
[1]  Pursuant to appellant's request that we do so, we have taken judicial notice of the stipulation for judgment, the judgment on stipulation for judgment and of the notice of entry of judgment in action No. 70523 of the Ventura County Superior Court, Lightweight Processing Company, Plaintiff v. County of Ventura et al., Defendants, and have augmented the record on appeal by the inclusion of certified copies of those documents and by the inclusion of the certified copy of the complaint for declaratory relief in said action No. 70523.
