
650 S.E.2d 527 (2007)
Kristen C. UMSTATTD, Mayor, et al.
v.
CENTEX HOMES, G.P.
Record No. 062152.
Supreme Court of Virginia.
September 14, 2007.
*528 Monica Taylor Monday (Barbara P. Beach, Town Atty.; Gentry Locke Rakes & Moore, Roanoke, on brief), for appellants.
John H. Foote (Michael J. Coughlin, Walsh, Colucci, Lubeley, Emrich & Walsh, on brief), Prince William, for appellee.
Present: HASSELL, C.J., KEENAN, KOONTZ, KINSER, and LEMONS, JJ., and RUSSELL and LACY[1], Senior Justices.
OPINION BY Senior Justice CHARLES S. RUSSELL.
This appeal presents the question whether mandamus was an appropriate remedy to *529 compel a local land development official to accept an application for a subdivision and a preliminary subdivision plat. For the reasons stated below, we conclude that mandamus was not a proper remedy.

Facts and Proceedings
The essential facts are undisputed. In 2003, Centex Homes, G.P., a Nevada general partnership (Centex), was contract purchaser of a 324-acre tract of land in the Town of Leesburg. The property had long been zoned R-1, a category permitting subdivision into one-acre lots. Centex sought rezoning into a category permitting more dense development, but ultimately concluded that its chances of success were "slim" and decided to proceed with development permitted as a matter of right under the existing R-1 zoning.
To that end, Centex prepared an application with an attached preliminary subdivision plat and, following the procedure required by the Town's ordinances, submitted it to the Town on January 23, 2006.[2] The planned subdivision, to be called "Meadowbrook," consisted of 191 single-family detached homes. Centex included with the application the required fee of $21,600. On February 2, 2006, the Town's Chief of Current Planning sent a letter to Centex stating that the Town was rejecting the preliminary subdivision plat "because of the existence of significant deficiencies."
The letter of rejection pointed out six grounds upon which the Town relied:
(1) The application failed to contain deed book and tax map references for the parcels of land included in the subdivisions as required by the subdivision ordinance;
(2) The plat failed to include "suitable information" concerning the coordination of streets within the subdivision with existing or planned neighboring streets in the area, particularly the planned "Battlefield Parkway;"
(3) The plat failed to comply with the Town's Design and Construction Standards Manual in that it allowed direct access from driveways into streets having a traffic count of more than 2000 vehicles per day;
(4) The plat violated a land development regulation by creating blocks more than 1200 feet in length;
(5) The plat violated a land development regulation by failing to provide that improvements to existing streets adjoining the subdivision would meet minimum standards; and
(6) The plat failed to conform to the Design and Construction Standards Manual by locating sewer lines along rear lot lines rather than along the centerlines of public rights of way "whenever possible."
Centex filed a complaint in the circuit court in two counts. The first count was a petition for a writ of mandamus to compel the Town to accept and process the application to a final decision by the Town's planning commission. The second count was a motion for a declaratory judgment that would declare the right of Centex to have its application accepted and processed by the Town's officials and to declare unlawful any local ordinance or regulation that would authorize the Town to refuse to do so.
The complaint asserted that the Town's real reasons for rejecting the application were to compel the subdivider to "reserve, dedicate, or build Battlefield Parkway, and to make improvements to adjoining and off-site roads in violation of Virginia law, and the Virginia and United States Constitutions." Centex contended that the required deed book and tax map references were in fact shown on the second page of the plat and that all other reasons the Town had given for refusing to accept the application were "pretextual," trivial, beyond the Town's authority and inapplicable to a subdivision that was a matter of right under the existing zoning ordinance.
Centex pointed out that the ultimate authority to grant or deny the application resided with the planning commission and not with the local officials, whose duties were purely ministerial. Centex contended that if *530 its application were wrongfully denied by the planning commission, it would be entitled to seek judicial review under Code § 15.2-2260, but that refusal by the local officials to accept the application left the applicant without any access to the courts and that there was no adequate remedy at law for any such arbitrary or unlawful refusal. After an ore tenus hearing, the circuit court agreed with Centex and awarded a writ of mandamus, directing the Town to accept and process the application in accordance with law. The court did not decide the claim for declaratory judgment, evidently concluding that it was rendered moot by the award of mandamus. We awarded the Town an appeal.

Analysis
Although the Town asserts five assignments of error, the first, relating to the appropriateness of mandamus as a remedy in these circumstances, is dispositive. We therefore do not reach the remaining assignments of error and reserve for another day the substantive questions raised by the parties.
Mandamus is an extraordinary remedy that may be used to compel a public official to perform a purely ministerial duty imposed by law. In re: Horan, 271 Va. 258, 258, 634 S.E.2d 675, 676 (2006). The use of the remedy is limited. It is not awarded as a matter of right but only in the exercise of a sound judicial discretion. It is not awarded in a doubtful case. It is not available where the applicant has an adequate remedy at law. Hertz v. Times-World Corporation, 259 Va. 599, 607-608, 528 S.E.2d 458, 462-63 (2000). A significant limitation upon the use of mandamus is the requirement that the duty to be enforced must be one in which the public official must act as a matter of course, without the exercise of his own judgment or discretion. Where the official duty involves the necessity on the part of the officer to make some investigation, to examine evidence and form his judgment thereon, mandamus will not be awarded to compel performance of the duty. To do so would improperly transfer to the court the discretion the law has committed to the officer. Richlands Medical Ass'n v. Commonwealth, 230 Va. 384, 386-87, 337 S.E.2d 737, 739 (1985).
Applying those principles, it is apparent that the decision to be made by the Town's officials in deciding whether to accept the application involved considerable investigation of the submitted plans, the conditions existing on the subject land and in the surrounding area, and the exercise of discretion and judgment in applying the applicable statutes, ordinances and regulations to the conditions found to exist.
The Town's subdivision ordinance, at § 13-57(a), requires the Land Development Official to "conduct an initial review of the application and preliminary plat of the proposed subdivision for completeness and technical accuracy." That section further provides that applications that "are deemed to be incomplete shall not be accepted until the deficiencies have been properly addressed." The ordinance also provides, at § 13-62(b)(1): "Unless a waiver is approved . . . all applications for preliminary plat approval shall be accompanied by the following information:. . . . ((j)) Proof of any approved special exceptions, variances or waivers necessary for the subdivision." If no waivers have been requested by the applicant, the requests for them may accompany the application but must be noted on the plat. Centex requested no waivers because it took the position that none could lawfully be required.
Thus, the Land Development Official was required to decide a mixed question of law and fact: What, if any, waivers were required in consideration of the facts of the proposed subdivision, the conditions existing on the subject land and the neighboring lands, and the mandates of the applicable statutes, ordinances and regulations?
Two examples will suffice to illustrate the nature of the questions confronting the Land Development Official: (1) The Town took the position that driveways shown on the plat offended the Standards Manual by providing direct access into Mason's Lane, a street having a traffic count of over 2000 vehicles per day. Centex argued that the ordinances forbade direct access only to "collector streets" and that Mason's Lane was shown as a "local street" and not a "collector street" on *531 the Town's Comprehensive Plan. (2) The Town took the position that the plat offended the ordinance by failing to accommodate Battlefield Parkway, a thoroughfare nearly completed on neighboring lands and planned to run through the proposed subdivision. The plat showed homes to be built in the path of this street and failed to coordinate the subdivision's internal streets with the proposed parkway. Centex argued that the Town could not lawfully or constitutionally require a subdivider to reserve or dedicate a right-of-way for planned public roads, the need for which is wholly unrelated to the development of the subdivider's property.
In order to determine whether the application was "incomplete" and contained "deficiencies," the official was required by § 13-62(b)(1)(j) of the ordinance to ascertain whether waivers were necessary as to these and the other disputes between the parties. The official's task was not purely ministerial. It involved the application of law to a complex set of facts and required the exercise of judgment. It was therefore not subject to compulsion by mandamus.
The present case differs from Board of Supervisors of Prince William County v. Hylton Enterprises, 216 Va. 582, 221 S.E.2d 534 (1976). There, we held that mandamus was the proper remedy to compel county officials to act on site plans that had been pending before them for over two years. We held that the duty of the officials to take action within a reasonable time was purely ministerial, but we did not undertake to dictate what action they should take. We agreed that the substance of their decision would lie within the officials' discretion. Id. at 584, 221 S.E.2d at 536. Here, the Town's officials acted upon the Centex application promptly, by rejecting it within ten working days as required by the ordinance. Centex complains not of their failure to act, but of the substance of their action and the reasons they gave to support it.
In Hylton, we held that declaratory judgment was not an adequate remedy at law because it is unavailable "where [the] claims and rights asserted have fully matured, and the alleged wrongs have already been suffered." Id. at 585, 221 S.E.2d at 537. In that respect also, Hylton differs from the present case. There, the developer had already suffered the wrong caused by the county officials' unwarranted failure or refusal to act on his site plans for a two-year period, resulting in the expense and disruption caused by the delay. Here, the claims and rights asserted by Centex have not matured, but remain to be resolved by judicial determination. Neither Centex nor the Town has yet taken final action in reliance on their respective contentions.
The purpose of the declaratory judgment statutes is to provide a mechanism for resolving uncertainty in controversies over legal rights, without requiring one party to invade the asserted rights of another in order to permit an ordinary civil action for damages. Code § 8.01-191; Miller v. Highland County, 274 Va. ___, ___, 650 S.E.2d 532, ___, 2007 WL 2683730 (2007) (this day decided); Hoffman Family, L.L.C. v. Mill Two Associates, 259 Va. 685, 693, 529 S.E.2d 318, 323 (2000); Cupp v. Board of Supervisors, 227 Va. 580, 592, 318 S.E.2d 407, 413 (1984); Liberty Mutual Ins. Co. v. Bishop, 211 Va. 414, 418, 177 S.E.2d 519, 522 (1970). We hold that in the circumstances of the present case declaratory judgment affords an adequate remedy. The mixed questions of law and fact in controversy, as well as the resolution of the legal disputes between the parties, remain pending before the circuit court as the subject of Centex' still unresolved claim for declaratory judgment. A declaratory judgment will decide those disputes and guide the parties in their future courses of action.

Conclusion
Because the circuit court erred in awarding mandamus, we will reverse the judgment appealed from and remand the case for further proceedings consistent with this opinion.
Reversed and remanded.
NOTES
[1]  Justice Lacy participated in the hearing and decision of this case prior to the effective date of her retirement on August 16, 2007.
[2]  The application and plat were submitted, rejected, and resubmitted three times. The proceedings involved in the first and second submissions are not pertinent to this appeal.
