
555 F.3d 10 (2009)
James T. LICHOULAS, Jr., Individually and as Trustee of the Appleton Trust, the Appleton Mill No. 5 Parking Trust, the Appleton Mill No. 5 Realty Trust, and the Parcel 291 Realty Trust, Plaintiff, Appellant,
v.
CITY OF LOWELL, Defendant, Appellee.
Nos. 08-1485, 08-2023.
United States Court of Appeals, First Circuit.
Heard December 1, 2008.
Decided January 30, 2009.
*11 Brian A. Davis with whom Laurence D. Pierce and Choate Hall & Stewart LLP were on brief for appellant.
Christine P. O'Connor, City Solicitor, City of Lowell, Law Department, for appellee.
Before LYNCH, Chief Judge, BOUDIN and LIPEZ, Circuit Judges.
BOUDIN, Circuit Judge.
James T. Lichoulas, Jr. owns or serves as trustee for five parcels of land (collectively, "the Appleton Properties") that were taken by eminent domain by the City of Lowell, Massachusetts. Located on the properties is a hydroelectric power *12 facility that was designed to generate electricity from the flow of water between the Pawtucket and Hamilton Canals. Although the facility is inactive, its existence is the occasion for Lichoulas' federal law suit. The background events are easily summarized.[1]
The Federal Energy Regulatory Commission ("FERC") granted a license on July 18, 1986, to operate a hydroelectric power project ("the Project") on the Appleton Properties. In 1994 the facility ceased to operate, save perhaps for a short period of time in 2002. On September 23, 2004, FERC concluded an exchange of letters with Lichoulas by stating that it deemed the project abandoned and that Lichoulas' license would be terminated unless the project returned to operating condition. See 18 C.F.R. § 6.4 (2008) ("[i]f any licensee ... shall abandon, or shall discontinue good faith operation of the project for a period of three years, the Commission will deem it to be the intent of the licensee to surrender the license....").
Lichoulas replied two months later that repairs on the project had been delayed by asbestos removal, but that he intended to develop a work plan by March of 2005, which he would forward to the Commission. The plan was never sent. On April 25, 2006, the City took the Appleton Properties by eminent domain under state law as part of an urban redevelopment project, thereafter informing FERC of its actions. FERC in turn began proceedings to terminate Lichoulas' license.
Lichoulas then filed the present law suit in federal district court, challenging the legality of the taking and asking that it be enjoined; his main theory was that section 807(a) of the Federal Power Act, 16 U.S.C. § 807(a)(2006), precluded the city from taking over a licensed hydroelectric facility unless it planned to "maintain, and operate" the facility. He also made a claim seeking just compensation for the taking.
Lowell moved to dismiss, urging that section 807(a) conferred no private right of action and, in the alternative, the statute by its terms only applies to hydroelectric projects that were "serviceable in the development, transmission or distribution of power. ..." 16 U.S.C. § 807(a). Without ruling definitively on these objections, the district court dismissed the complaint pending the conclusion of the FERC proceedings and declined to consider the request for compensation.
Lichoulas has appealed from the district court's dismissal.[2] Since the district court's dismissal, FERC has entered an order terminating the license, Order Terminating License By Implied Surrender, 124 FERC ¶ 61,255 (Sept. 18, 2008), reh'g denied, 125 FERC ¶ 61,195 (Nov. 20, 2008) (Lichoulas has said that he plans to seek review of the termination). He offers several objections to the district court's ruling, which we address after considering sua sponte a possible appellate jurisdictional issue.
The district court's decision did not determine the merits and said that Lichoulas may refile the action "after the conclusion of the FERC proceedings." In certain *13 cases, dismissals without prejudice with leave to amend are viewed as nonappealable because of the "final judgment" requirement. 28 U.S.C. § 1291 (2006), e.g., North Carolina Nat'l Bank v. Montilla, 600 F.2d 333, 334-35 (1st Cir.1979).
However, such cases generally involve easily remediable defects, see generally 15A Wright, Miller, & Cooper Federal Practice & Procedure, § 3914.6 at 145 n. 18 (2d ed. Supp.2000), and a closer analogy to this case is a dismissal for lack of ripeness, which does constitute an appealable order. Bateman v. City of W. Bountiful, 89 F.3d 704, 705-06 (10th Cir. 1996). True enough, a stay of proceedings by the district court pending agency action would ordinarily not be appealable, Fuchs, for and on Behalf of N.L.R.B v. Hood Indus., Inc., 590 F.2d 395, 396 (1st Cir. 1979); but if the line between a stay and a dismissal is somewhat formal, formality is an element in determining what is or is not a final judgment.
Lichoulas' first claim on appeal is that his complaint alleged that the hydroelectric project was duly licensed and that the license had not been "abandoned or surrendered" at the time of the taking. Accordingly, he says, the district court was required on the motion to dismiss to accept that all well-pleaded allegations in the complaint are true. Rumford Pharmacy, Inc. v. City of E. Providence, 970 F.2d 996, 997 (1st Cir.1992). The short answer is that the court was entitled, so far as relevant, to take judicial notice of the FERC proceeding. Town of Norwood, 202 F.3d at 412 n. 1.
Lichoulas' more substantive objection is that (he argues) any supposed revocation of the license is irrelevant because state law assesses the legality of takings at the time the property is seized; subsequent events, the argument goes, cannot remedy a tainted taking. See Burwick v. Mass. Highway Dep't., 57 Mass.App.Ct. 302, 309, 782 N.E.2d 1110 (2003) ("Where the statutory requirements for an order of taking have been neglected, no subsequently entered order may cure the defect.").
We need not resolve this objection nor others on which relief on the merits might depend, such as whether there is a private right of action under section 807 or whether the city's taking of a dormant plant would violate the statute. This is not a case where the taking had any effect on the ongoing production of power or where FERC has evidenced any concern. Lichoulas is simply seeking to have the federal court derail a state takings proceeding in whichgiven the Supremacy Clause he could presumably raise his objections.
The district court had no obligation to oblige. In general, declaratory and injunctive relief are both matters of judicial discretion.[3] Here, the evident prospect that FERC would revoke the license made clear that the federal interest, such as it was, would likely be mooted; and any objection to the taking, or deficiency in adequate compensation, could be and preferably is to be done in state proceedings. Williamson County Reg'l Planning Comm'n v. Hamilton Bank of Johnson City, 473 U.S. 172, 194, 105 S.Ct. 3108, 87 L.Ed.2d 126 (1985).
*14 Under these circumstances, the district court was entitled, as a matter of judicial judgment, to await the outcome of a FERC proceeding that likely would eliminate any warrant for intervention by a federal court. Whether a stay of proceedings might have been used (rather than a dismissal without prejudice) is of no consequence here: FERC did in fact terminate the license. If that termination is undone through appeal of the FERC order, Lichoulas has the district court's leave to refile his complaint.
To the extent that Lichoulas seeks compensation for the taking, the claim is properly brought in state court, as Williamson makes clear. As for Lichoulas' appeal from the district court's refusal to issue a lis pendens, M.G.L. c. 184, § 15(a)(2003), there is no federal suit currently pending so that request is moot.
Affirmed.
NOTES
[1]  Because the district court granted a motion to dismiss, we assume the truth of the allegations of the complaint, Beddall v. State Street Bank & Trust Co., 137 F.3d 12, 17 (1st Cir. 1998), and take judicial notice of the related FERC proceedings. Town of Norwood v. New England Power Co., 202 F.3d 408, 412 n. 1 (1st Cir.2000).
[2]  By a separate complaint, Lichoulas sought a memorandum of lis pendensa notice for public records that title to property is in litigationwhich the district court denied and from which he has also appealed. We consolidated the two appeals for review.
[3]  See, e.g., Wilton v. Seven Falls Co., 515 U.S. 277, 288-89, 115 S.Ct. 2137, 132 L.Ed.2d 214 (1995) (noting that district court has discretion under Declaratory Judgment Act whether or not to exercise jurisdiction); Rossi v. Gemma, 489 F.3d 26, 38 (1st Cir.2007) (same); see also Ross-Simons of Warwick, Inc. v. Baccarat, Inc., 217 F.3d 8, 13 (1st Cir.2000) ("district courts have broad discretion to ... make determinations regarding the propriety of injunctive relief") (internal quotation marks omitted).
