
270 N.W.2d 447 (1978)
Ray R. CURTIS, John A. Carlin, William R. McGimpsey, Robert Fedderson and Richard Keller, Appellants,
v.
BOARD OF SUPERVISORS OF CLINTON COUNTY, Iowa, and James E. Vining, Clarence Smith and Robert Burke, as members thereof, Appellees.
No. 61236.
Supreme Court of Iowa.
October 18, 1978.
*448 Gerald P. Schutte of Stevens, Glotfelty, Roeder & Sissel, Davenport, for appellants.
G. Wylie Pillers, III, County Atty., for appellees.
Considered by UHLENHOPP, P. J., and McCORMICK, ALLBEE, McGIVERIN and LARSON, JJ.
McCORMICK, Justice.
The question here is whether certiorari will lie to challenge a resolution of a board of supervisors regarding the proposed location of a freeway overpass. The trial court held certiorari is not available for that purpose. We affirm.
This case comes to us in an unusual posture. Plaintiffs, alleging they are residents of Clinton County, filed a petition for writ of certiorari attacking a resolution of the defendant Clinton County board of supervisors relating to the placement of an overpass on proposed north-south freeway 561. The court ordered the writ to issue. Without making return, defendants filed a motion to set aside the writ on the ground the board action was not subject to certiorari review. After hearing arguments on the motion, the trial court agreed with defendants and denied the petition.
The rules of civil procedure do not provide for a motion to set aside a writ of certiorari. However, defendants' motion essentially alleged the petition did not state a claim on which certiorari relief could be granted. It was thus in substance a motion to dismiss under rule 104(b), Rules of Civil Procedure, and will be considered as such. The trial court's ruling denying the petition will be reviewed as a judgment dismissing the petition under the rule.
A motion to dismiss is sustainable only when it appears to a certainty the pleader has failed to state a claim upon which any relief may be granted under any state of facts provable under the allegations. The motion admits the allegations and waives any ambiguity or uncertainty in the pleading. The allegations are construed in their light most favorable to the pleader, and doubts are resolved in his favor. Weber v. Madison, 251 N.W.2d 523, 525 (Iowa 1977).
The motion cannot be based upon facts not alleged in the pleading which is assailed, unless judicial notice can be taken of additional facts. Winneshiek Mut. Ins. Ass'n v. Roach, 257 Iowa 354, 132 N.W.2d 436 (1965). Defendants in this case rely on several factual allegations which do not appear in the petition and are not subject to judicial notice. Therefore we must disregard them.
*449 We are left with a petition which alleges: freeway 561 is a north-south freeway which will be built in the future between Davenport and Dubuque; it will cross two east-west roads near DeWitt, the north one called Stahl's Road and the south one called Muskrat Road; the Iowa department of transportation decided to build an overpass over only one of the two roads and recommended it be located over Muskrat Road; plaintiffs favor the Muskrat Road location and petitioned defendants to that effect; on July 13, 1977, defendants held a meeting to which plaintiffs were invited but at which they were not allowed to speak; and at the meeting defendants adopted a resolution which had been prepared in advance selecting Stahl's Road as the overpass location and reciting that the department of transportation was to be notified of the decision for its information.
Plaintiffs asserted that in adopting the resolution the board exceeded its jurisdiction and acted illegally, arbitrarily and capriciously on three grounds: (1) board member Robert Burke, who lives on Stahl's Road and who abstained from voting, nevertheless improperly influenced the decision by "directly or indirectly" circulating a petition opposing plaintiffs' position; (2) the board ignored overwhelming evidence that Muskrat Road would be a preferable location for the overpass; and (3) no findings and conclusions were made.
Rule 306, R.C.P., provides when a writ of certiorari may be granted:
A writ of certiorari shall only be granted when specifically authorized by statute; or where an inferior tribunal, board or officer, exercising judicial functions, is alleged to have exceeded its, or his proper jurisdiction or otherwise acted illegally.
Here the writ was not specifically authorized by statute. The board is an "inferior tribunal" which is alleged by plaintiffs to have exceeded its jurisdiction and acted illegally. However, the question in the present dispute is whether in deciding where it wanted the freeway overpass it was "exercising judicial functions" within the meaning of the rule.
We have adopted broad criteria for deciding the availability of certiorari. "Judicial functions" include acts which are judicial or which resemble judicial acts. An inferior tribunal exercises a judicial function when (1) the questioned act involves a proceeding in which notice and opportunity to be heard are required, or (2) a determination of rights of parties is made which requires the exercise of discretion in finding facts and applying the law. However, the mere exercise of judgment or discretion is not alone sufficient. Buechele v. Ray, 219 N.W.2d 679, 681 (Iowa 1974).
The challenged act will ordinarily be deemed judicial if it determines a right which is traditionally protected by the courts. Dunphy v. City Council of City of Creston, 256 N.W.2d 913, 917 (Iowa 1977). One of the purposes of the writ is to supply a remedy for defects of justice which cannot be corrected by appeal or other procedures. Massey v. City Council of Des Moines, 239 Iowa 527, 531, 31 N.W.2d 875, 878 (1948).
The disputed act in the present case fails these broad tests. Freeways are part of the primary road system. § 306.3(2), The Code. Jurisdiction of the primary road system is vested exclusively in the department of transportation. § 306.4(1). This includes the power to determine the location and design of highways in that system. Harvey v. Iowa State Highway Comm., 256 Iowa 1229, 1232, 130 N.W.2d 725, 727 (1964).
The department's jurisdiction brings with it the power, on its own motion, to alter or vacate any highway crossing in its system. § 306.10, The Code. Notice and hearing procedures are provided. §§ 306.11-306.16, The Code. More specifically, the department has the power to close county roads at the right-of-way boundary line of a freeway, using chapter 306 notice and hearing procedures to do so. § 306A.6, The Code. See Hinrichs v. Iowa State Highway Comm., 260 Iowa 1115, 152 N.W.2d 248 (1967).
Thus the department of transportation, not the local board of supervisors, has the *450 authority to decide where to put freeway overpasses and what county roads will be closed at the freeway. Plaintiffs concede as much. However, they contend the department of transportation will defer to the local board's decision regarding location of the overpass. They also contend the board decision thus effectively vacates the county road where it intersects the freeway at the site not selected for the overpass. They say they could have proved these contentions if their petition had been tried on the merits.
The problem with these contentions is they do not alter the fact that the department of transportation must make the actual decision as to overpass location, even if this decision is a mere ratification of the board's wishes. After it makes that decision, the department must conduct the necessary proceedings to close the other county road at the right-of-way boundary. Its decisions are subject to judicial review. §§ 306.17 and 17A.19, The Code.
Hearings held by the department prior to making these decisions must be meaningful. Bricker v. Iowa County Bd. of Supervisors, 240 N.W.2d 686, 690 (Iowa 1976). Plaintiffs must be afforded full opportunity to present their evidence and views, including their challenge to the board resolution. If the department denies them that opportunity, they may present their contentions in a judicial review proceeding just as they sought to do in the certiorari action against the board. See § 17A.19(7), The Code.
No quantity of proof in the certiorari action could change the controlling statutes which vest jurisdiction to decide freeway overpass location in the department. Because the board of supervisors lacks authority to decide the issue, its resolution does not decide it. Under the statutes its viewpoint is no more than advisory. If the department decides to be bound by it, the final decision is nonetheless that of the department and is reviewable as such.
Plaintiffs are not without remedy. It is simply premature to bring the problem to court before the department has made its decision.
The board resolution is not a judicial act nor does it resemble one. It does not deprive plaintiffs of any right which the courts at this stage must protect. We hold it is not reviewable in certiorari as a judicial function.
The trial court was correct in sustaining the motion.
AFFIRMED.
