Defendants William A. and Sandra Marts appeal from the trial court’s order granting summary judgment to the Town of Pinebluff and issuing an injunction requiring the Marts to comply with the Town’s zoning ordinance and maintain a mini-park and open space in a subdivision they developed. The bulk of the Marts’ arguments on appeal constitute a collateral attack on the zoning ordinance and, therefore, were not properly raised as a defense to the Town’s action for an injunction enforcing the ordinance. The Marts had the ability and the opportunity to assert their contentions regarding the validity of the ordinance by seeking a variance from the ordinance or obtaining review of decisions by the Town, but chose not to do so. Since we find the remainder of the Marts’ contentions also unpersuasive, we affirm the trial court’s order.
In 2001, the Town enacted the “Town of Pinebluff Unified Development Ordinance” (“the UDO”), Article XIII of which requires developers of new residential developments to provide mini-parks and open space for the recreational use of their residents. The Marts are the original developers of the Willow Creek Subdivision located in the Town. Before the UDO was adopted, the Marts obtained the Town’s approval and began development of Phase I of Willow Creek *661with the intention of subsequently proceeding with Phases II and IÍI. The Town subsequently notified the Marts that Phases II and III of Willow Creek would have to comply with the requirements of the newly-adopted UDO.
On 18 August 2003, the Marts submitted an application for a conditional use permit for the development of Phases II and III. The application included a memo to the Town from the Marts referring to “Parks and Open Space” and stating that they “agree[d] to install a mini-park before the start of sales of the third phase of the Willow Creek Subdivision.” The application also attached draft restrictive covenants that would establish a homeowners’ association among the development’s residents to provide assessments for the maintenance of common areas, including open space and a mini-park. The Marts, however, never recorded those covenants.
In October 2003, the Town’s Board of Commissioners held a public hearing on the Marts’ conditional use permit application for Phases II and III. Following that hearing, the Board approved the conditional use permit subject to the mini-park’s being developed before the final plat approval for Phase III.
The final plat for Phase II was approved on 1 November 2004. In May 2005, Mr. Marts sought final plat approval for Phase III so that he could sell the lots in Phase III, along with the remaining lots in Phase II, to Ron Jackson. Mr. Marts indicated that the Marts would retain ownership of one lot and would install the mini-park on that lot. In order to ensure that the Marts built the mini-park, the Town accepted from Mr. Marts an irrevocable letter of credit in the amount of $10,000, although the Town never called the bond, which lapsed after one year.
The Phase III final plat was approved on 19 May 2005 and, subsequently, the Marts sold the remainder of the subdivision to Mr. Jackson. In September 2006, the Marts informed the Town that they did not intend to build the mini-park, and they were thinking about posting a “no trespassing” sign in the area reserved as open space.
On 11 December 2006, the Town brought suit against the Marts in Moore County Superior Court, contending that, the Marts were “in continuing violation of the UDO” and seeking an injunction ordering the Marts to comply with the UDO by installing a mini-park and reserving open space in Willow Creek. On 25 January 2008, the Honorable James M. Webb granted the Town’s motion for summary *662judgment, ordering the Marts to install a mini-park and provide open space in the development by 31 May 2008. The Marts timely appealed to this Court.
This Court reviews an order granting summary judgment de novo. Wilkins v. Safran, 185 N.C. App. 668, 672, 649 S.E.2d 658, 661 (2007). “ ‘Summary judgment is proper if the pleadings, depositions, answers to interrogatories, and admissions on file, together with the affidavits, if any, show that there is no genuine issue as to any material fact and that any party is entitled to a judgment as a matter of law.’ ” Id. at 671-72, 649 S.E.2d at 661 (quoting Draughon v. Harnett County Bd. of Educ., 158 N.C. App. 208, 212, 580 S.E.2d 732, 735 (2003), aff’d per curiam, 358 N.C. 131, 591 S.E.2d 521 (2004)). “ ‘If the granting of summary judgment can be sustained on any grounds, it should be affirmed on appeal.’ ” Rakestraw v. Town of Knightdale, 188 N.C. App. 129, 131, 654 S.E.2d 825, 827 (quoting Wilkins, 185 N.C. App. at 672, 649 S.E.2d at 661), disc. review denied, 362 N.C. 237, 659 S.E.2d 739 (2008).
 The Marts first challenge the UDO’s validity, contending that the ordinance is an illegal restraint on alienation, void as against the Rule Against Perpetuities, and invalid due to the Town’s failure to comply with statutory notice requirements. The Marts did not, however, challenge the UDO in a direct action against the Town, but rather assert their arguments only as a defense to the Town’s action for an injunction enforcing the ordinance.
In City of Elizabeth City v. LFM Enters., Inc., 48 N.C. App. 408, 413, 269 S.E.2d 260, 262 (1980), the city filed an action seeking an injunction requiring the defendants to comply with a city ordinance. The defendants had previously filed an application for a variance from the ordinance that was denied, but did not seek judicial review of that decision. When, however, the city sought to enforce the injunction, the defendants challenged the ordinance’s validity. Id. at 412, 269 S.E.2d at 262. This Court affirmed the trial court’s grant of summary judgment to the city, holding that the defendants “failed to exercise the remedies available to them under the zoning ordinance and may not as a defense to the plaintiff’s action for injunctive relief collaterally attack the validity of the ordinance.” Id. at 413, 269 S.E.2d at 262.
*663The principle in LFM Enters. is well established. See also Wil-Hol Corp. v. Marshall, 71 N.C. App. 611, 614, 322 S.E.2d 655, 657 (1984) (“A zoning ordinance may not be collaterally attacked by a party that failed to avail herself of the judicial review that the ordinance and statutes authorize.”); City of Hickory v. Catawba Valley Mach. Co., 39 N.C. App. 236, 238, 249 S.E.2d 851, 852 (1978) (“Defendant failed to exercise the remedies available to it under the zoning ordinance and may not as a defense to the city’s action for injunctive relief collaterally complain that the city denied it due process of law.”); Forsyth County v. York, 19 N.C. App. 361, 364-65, 198 S.E.2d 770, 772 (holding that defendant, who could have challenged constitutionality of zoning ordinance by seeking review of Board of Adjustment decision, “may not now challenge the validity of the zoning ordinance he allegedly violated in an effort to avoid a summary judgment”), cert. denied, 284 N.C. 253, 200 S.E.2d 653 (1973).
In this case, the Marts could have raised their arguments regarding the validity of the UDO by seeking relief from the ordinance’s requirement of a mini-park and open space or by seeking review of the Town’s determination that Phases II and III were required to comply with the UDO. Rather than directly challenging the UDO, the Marts waited to object to the ordinance until after the Town sought to enforce it as a result of their undisputed non-compliance. We cannot meaningfully distinguish the above cases and, therefore, hold that the Marts may not in this action collaterally attack the validity of the UDO as an illegal restraint on alienation, as void as against the Rule Against Perpetuities, and as invalid due to the Town’s failure to comply with the statutory notice requirements. Because of our resolution of this issue, we need not address the Town’s argument that the Marts’ contentions are barred by the statute of limitations.
 The Marts also contend that the Town is equitably estopped from seeking an injunction requiring them to comply with the mini-park and open space requirements of the UDO. The elements of equitable estoppel are “(1) lack of knowledge and the means of knowledge of the truth as to the facts in question; (2) reliance upon the conduct of the party sought to be estopped; and (3) action based thereon of such a character as to change his position prejudicially.” Hawkins v. M&J Fin. Corp., 238 N.C. 174, 178, 77 S.E.2d 669, 672 (1953). The Marts base their estoppel defense on their claim that the Town approved the plat for the entire subdivision before adopting the UDO, and the Marts then proceeded with the development of Phases II and III of *664the subdivision without knowledge that the Town intended to enforce the UDO as to those phases despite the initial plat approval.
We need not address the factual or legal bases for this defense since estoppel cannot apply when a municipality is enforcing a zoning ordinance. “In enacting and enforcing zoning regulations, a municipality acts as a governmental agency and exercises the police power of the State.” City of Raleigh v. Fisher, 232 N.C. 629, 635, 61 S.E.2d 897, 902 (1950). Our courts have held that this police power “cannot be bartered away by contract, or lost by any other mode.” Id. Therefore, “a municipality cannot be estopped to enforce a zoning ordinance against a violator by the conduct of its officials in encouraging or permitting such violator to violate such ordinance in times past.” Id. See also Overton v. Camden County, 155 N.C. App. 391, 398, 574 S.E.2d 157, 162 (2002) (holding that county was not estopped from enforcing uniform development ordinance against plaintiff even though it had not done so at earlier hearing); City of Winston-Salem v. Hoots Concrete Co., 47 N.C. App. 405, 414, 267 S.E.2d 569, 575 (“A city cannot be estopped to enforce a zoning ordinance against a violator due to the conduct of a zoning official in encouraging or permitting the violation.”), disc. review denied, 301 N.C. 234, 283 S.E.2d 131 (1980). Accordingly, the trial court did not err in failing to conclude that the Town was estopped from enforcing the UDO against the Marts.
 The Marts next argue that the trial court erred in issuing an injunction ordering them to comply with the UDO without first considering the Marts’ “potential inconvenience, expenses, and exposure to liability.” We disagree.
Each of the cases relied upon by the Marts in support of their contention that the trial court was required to “balance the equities” before issuing an injunction involve a private party seeking an injunction to remedy a private injury. See Hodge v. N.C. Dep’t of Transp., 137 N.C. App. 247, 253, 528 S.E.2d 22, 27 (“In deciding whether to issue an injunction, the judge should engage in a balancing process, weighing potential harm to the plaintiff if the injunction is not issued against the potential harm to the defendant if the injunction is issued.”), reversed on other grounds, 352 N.C. 664, 535 S.E.2d 32 (2000); Clark v. Asheville Contracting Co., 72 N.C. App. 143, 149, 323 S.E.2d 765, 769 (1984) (holding that the trial court erred in failing to make findings of fact about the “relative convenience-inconvenience *665and the comparative injuries to the parties” before issuing injunction), aff’d as modified, 316 N.C. 475, 342 S.E.2d 832 (1986). We believe that actions by municipalities to enforce ordinances present a distinguishable situation.
The Town was entitled to seek an injunction pursuant to N.C. Gen. Stat. § 160A-375 (2007) and N.C. Gen. Stat. § 160A-389 (2007). N.C. Gen. Stat. § 160A-375(a) (emphasis added) provides that a municipality “may bring an action for injunction of any illegal subdivision, transfer, conveyance, or sale of land, and the court shall, upon appropriate findings, issue an injunction and order requiring the offending party to comply with the subdivision ordinance.” N.C. Gen. Stat. § 160A-389 authorizes a municipality to file actions “to restrain, correct or abate the violation” of a municipality’s zoning ordinance. The North Carolina courts have not addressed, however, whether a trial court entering an injunction pursuant to these statutes must still balance the equities of the parties.
We note that other jurisdictions are split regarding whether a trial court is required to “balance the equities” before issuing an injunction to enforce a zoning ordinance. Compare Pinecrest Lakes, Inc. v. Shidel, 795 So.2d 191, 207 (Fla. Dist. Ct. App. 2001) (holding that trial court was not required to balance equities before issuing an injunction to enforce a development ordinance because statute authorizing action said nothing about weighing equities), review denied, 821 So.2d 300 (2002), with City of East Providence v. Rhode Island Hosp. Trust Nat’l Bank, 505 A.2d 1143, 1145-46 (R.I. 1986) (holding that statute granting court authority to order removal of building in violation of zoning ordinance did not abrogate principle that prior to granting injunction to municipality to enforce ordinance, trial court must balance equities). We need not decide the rule for North Carolina, however, because the Marts have failed to make a showing that enforcement of the injunction would be inequitable.
The Marts argue that the court erred because it “never considered the financial obligation that was thus imposed on [the Marts] and completely overlooked the potential liability that [they] would face— forever—in the likely event that children and others at play in these areas might be injured on the playground equipment or elsewhere.” They further argue that “Judge Webb never considered whether the existence of a mini-park or open spaces might serve as a magnet for undesirables in the area to congregate and engage in illegal activities, perhaps involving drug peddling or usage, or both.”
*666These “equities,” however, go to the effect of the ordinance and not to the effect of the issuance of the injunction. Only the Town’s Board of Commissioners may consider the policy concerns raised by the Marts regarding the effect of the ordinance’s requirement of a mini-park and open space. It is not the role of the courts to decide the wisdom of an ordinance. See, e.g., Town of Pine Knoll Shores v. Evans, 104 N.C. App. 79, 83, 407 S.E.2d 895, 897 (1991) (explaining that “it is this Court’s duty to apply the ordinance irrespective of any opinion we may have as to its wisdom, for it is our duty to ‘declare what the law is . . . [not] what the law ought to be’ ” (quoting Vinson v. Chappell, 3 N.C. App. 348, 350, 164 S.E.2d 631, 633 (1968), aff’d, 275 N.C. 234, 166 S.E.2d 686 (1969))), aff’d as modified, 331 N.C. 361, 416 S.E.2d 4 (1992). Because the Marts have not pointed to any inequities resulting from the injunction itself, we need not decide whether the trial court was required to “balance the equities” as contended by the Marts.
 The Marts further argue that the Town’s application of the UDO to Phases II and III constitutes a retroactive application of the UDO and an unconstitutional impairment of contract in violation of U.S. Const, art. I, § 10 (“No state shall. . . pass any . . . law impairing the obligation of contracts ....”). Our Supreme Court has held that in order to determine whether there has been an unconstitutional impairment of contract, courts must apply a three-part test and determine: “(1) whether a contractual obligation is present, (2) whether the state’s actions impaired that contract, and (3) whether the impairment was reasonable and necessary to serve an important public purpose.” Bailey v. State, 348 N.C. 130, 141, 500 S.E.2d 54, 60 (1998).
The Marts have made no attempt to show that they submitted sufficient evidence regarding each of these elements. Instead, they simply assert that “[although the Developer was going to develop the property in stages, he made it clear to the Planning Board that there would be three phases in all, and the Town’s initial approval implicitly recognized that.” The Marts then argue that the application of the UDO to Phases II and III “notwithstanding that the Developer had made clear from the outset that this project ultimately involved three phases” was retroactive and unconstitutional.
These assertions are not, however, sufficient to demonstrate either factually or legally that any contractual obligation existed. The Town submitted the affidavit of Stephen Minks, the Town’s Planning *667Director/Zoning Administrator, in which Mr. Minks stated that the initial approval given to the Marts was only for Phase I. According to Mr. Minks, the Marts did not seek approval of Phase II and Phase III until 2002 and 2003 respectively, after the UDO had been adopted. The Marts have cited no evidence to the contrary. In addition, the Marts have pointed to no authority that would suggest that the Town’s knowledge, at the time that it approved Phase I, that the Marts intended later to seek approval of Phases II and III constituted the “contractual obligation” required by Bailey. The Marts have, therefore, failed to establish any unconstitutional impairment of contract.
 Finally, the Marts argue that the Town’s requiring that they reserve open space and install a mini-park is an unconstitutional taking. In River Birch Assocs. v. City of Raleigh, 326 N.C. 100, 121-22, 388 S.E.2d 538, 550-51 (1990), however, our Supreme Court upheld a similar ordinance against a takings challenge.
In River Birch Assocs., the ordinance required that the developer reserve open space and convey it to the homeowners’ association as a common area. Id. at 120, 388 S.E.2d at 550. The Court observed first that “[t]he objective of preserving open space is within the scope of a municipality’s police power” and that “the General Assembly has recognized the importance of preserving open space and has given broad authority to municipalities to take action to conserve open space.” Id. at 121, 388 S.E.2d at 550 (citing N.C. Gen. Stat. §§ 160A-402, -372 (1987)). In language equally applicable to this case, the Court then noted that the ordinance was “part of a comprehensive plan of development that applies uniformly to all property owners and from which all property owners, including developers, will benefit.” Id. The Court then held that “[a] requirement of dedication of park space for subdivision approval does not necessarily constitute a taking. Where the subdivider creates the specific need for the parks, it is not unreasonable to charge the subdivider with the burden of providing them. Here, the increased density of development renders necessary the setting aside of open space.” Id. at 122, 388 S.E.2d at 551 (internal citations omitted).
We believe that River Birch Assocs. controls. The Marts attempt to distinguish River Birch Assocs. by suggesting that the developer was allowed to develop its subdivision in a manner more intensively than other subdivisions and, thus, received a benefit that made the requirement of open space not a taking. The Marts have misread the *668opinion: the Supreme Court indicated that the subdivision at issue met all of the city’s subdivision requirements and, therefore, the developer did not receive any special benefit. Id. at 105, 388 S.E.2d at 541. The Supreme Court simply held that because a subdivision is more intensively developed than other property, subdivision ordinances requiring open space of the type in River Birch Assocs. are not a taking. We, therefore, hold that the ordinance in this case falls within the scope of River Birch Assocs. The trial court, consequently, did not err in granting summary judgment and enjoining the Marts’ violation of the UDO.
Judges ROBERT C. HUNTER and ELMORE concur.