The opinion of the court was delivered by
Thiele, J.:This appeal arises from a judgment against the city of Wichita in an action wherein the city sought to abate an alleged nuisance and to enjoin a defendant property owner from maintaining a building alleged to have been erected and now existing in violation of the zoning ordinance of the city.
*620So far as need be noticed, the petition, filed November 22, 1941, alleged that the defendant Boles was the owner of certain real estate known as 603 North Oliver street, and that the defendant Pittman was a building contractor; that for many years there was in effect, in the city a zoning ordinance which among other things provided for the size of front yards, section 12 providing in part as follows:
"Front Yard. Where a majority of all the buildings fronting on one side of a street between intersecting streets have observed a minimum front yard line from the street line, no building hereafter erected or altered shall project beyond the front yard line so established, Provided, however, no building shall be required to set back a distance greater than forty (40) feet from the street line in complying with this regulation. Where there are no buildings on one side of a street between two intersecting streets, there shall be a minimum front yard of at least twenty (20) feet.”
That notwithstanding the ordinance, the defendants unlawfully erected a garage upon the real estate, the same being twenty-four feet and six inches from the North Oliver street line; that the minimum front yard line within that block theretofore observed by the property owners was thirty feet and three inches, and the garage building encroached beyond the minimum li.ne so observed a distance of five feet and nine inches, contrary to the ordinance; that the erection of the garage without observing the minimum front yard line was deliberate and intentional, and its location was unlawful and constituted a nuisance under G. S. 1935, 12-710, and unless enjoined and restrained, defendants would continue to maintain the garage contrary to the ordinance, and the nuisance should be abated and defendants permanently enjoined.
The answer of defendant Pittman denied that a majority of the houses in. the block had observed a minimum front yard line and alleged the ordinance was too indefinite for legal construction and interpretation, and by a supplementary answer alleged that the section of the ordinance was unconstitutional. He also alleged that he had applied to and received from the city a permit to construct a duplex on the real estate. The answer of defendant Boles contained admissions and denials which need not be set forth. The city’s reply denied unconstitutionality; admitted issuance of the building permit for a duplex, and alleged violation in locating the building where it is located in respect to the setback from Oliver street; that defendants were notified the contemplated location was unlawful at the very commencement of the work; that under the zoning ordinance there was a provision for a board to grant relief in case of *621hardship but defendants made no application to that board for any relief, and that compliance with the ordinance would not have resulted in any hardship.
At the trial, the city was represented by two attorneys, and each defendant was represented by his own attorney. As a result of colloquy among'the four, the facts were all agreed, and so far as necessary will be mentioned later. The matter was submitted to the trial court with leave to file briefs, and thereafter the court filed a memorandum opinion containing a statement of some of the facts and a discussion of the law applicable thereto, and concluding it would be inequitable “at this late date” to grant a mandatory injunction requiring Boles to remove any portion of his building. The city filed a motion for a new trial, and upon consideration, the trial court denied the motion and rendered judgment for the defendants. The city has appealed from the judgment and the adverse rulings.
Before proceeding to any discussion of the contentions urged in the briefs, attention is directed to two rules of appellate practice. The first is that where the facts are agreed on, what -constitutes an invasion of a party’s rights is a question of law and the appellate court can determine what is shown by the facts as readily and as’ fully as the district court. (See Kansas Pacific R. Co. v. Butts, 7 Kan. 308; and Brown v. Evans, Adm’r, 15 Kan. 88.) The situation is analogous to that whére the evidence is all in writing. (See Federal Agency Investment Co. v. Baker, 122 Kan. 460, 252 Pac. 262; Palmer v. Johnson, 132 Kan. 161, 294 Pac. 874, and cases cited.) The other rule is that if the trial court renders a correct judgment under the facts and the law, the judgment will not be disturbed merely because wrong reasons are given for its rendition. (See La-Harpe Farmers Union v. United States F. & G. Co., 134 Kan. 826, 828, 8 P. 2d 354; State, ex rel., v. Iola Theater Corp., 136 Kan. 411, 414, 15 P. 2d 459; Wolgamott v. Vinegar Hill Zinc Co., 151 Kan. 374, 378, 99 P. 2d 755, and cases cited.)
It appears that defendant Icoles owned three lots which fronted on and were known as 603 North Oliver street, the south lot being just north of Elm street, the address on that street being 4722 East Elm street. On October 8, 1941, Pittman, as contractor, applied to the city for and received a permit to erect a two-family dwelling with garage attached, heretofore and hereafter referred to as the duplex, at the two addresses noted. The application and the permit *622showed the owner to be Frank G. Boles, whose address was Liberal, Kan. Pittman started construction and an inspector of the city called his attention to the fact the foundation was not as far back from Oliver street as the city contended it should be. The city does not contend that any notice was given to Boles. The agreed facts include certain photographs from which it appears the duplex is one story high, facing south, with the residence portions in the center, with a single-car garage at the east and west ends, the entire building being covered with a single continuous roof. The record also contains a plat showing the location with reference to the front street line of all the six houses in the block. No two of them are set back the same distance from the street, the distances varying from 23.8 to 42.6 feet. The duplex is set back 24.1 feet. Immediately to the north of the duplex is a bungalow-type residence, which has a single continuous roof which extends to within 23.8 feet of the front lot line. A more detailed reference to this residence is later made.
In its memorandum opinion the trial court, after noting the section of the ordinance quoted above, was attacked on the ground it was unconstitutional, and that it was not sufficiently definite to enable the defendant Boles to know whether he was in fact violating it, concluded the ordinance was Constitutional, and that it was sufficiently explicit. The trial court construed the section to mean that where there are houses with varying setbacks, then no house shall be built any nearer to the curb than the house closest to the curb. With that conclusion we do not agree. It is clear that the first house built could be no closer than twenty feet from the curb, but if it were built forty feet from the curb and another were set back the same distance, then a third would have to be so set back because the two would constitute a majority. It is equally clear that the ordinance does not provide for taking an average of the setbacks of the houses already erected. However applicable the provision may be where a maj ority of the houses in a block have observed a minimum front yard line, that situation does not obtain here. The plat offered in evidence and the stipulation with respect to it do not disclose the order in which the five houses erected prior to erection of the duplex were erected, but the plat clearly discloses that no two of the houses were erected the same distance from the street line. It would be possible to average the various setbacks, but to say that a majority observed any particular front line requirement, as applied to the facts here, is impossible. It is not necessary that we *623discuss the question of constitutionality, as presented by both parties.
In its memorandum opinion the trial court made no mention of the house immediately to the north of the duplex. As has been stated, this house has a single continuous roof which extends to within 23.8 feet of the street line, or closer than the duplex. On the ground floor under this roof is a recessed porch, the front of the house to the rear of the porch being 32.4 feet from the street line. A photograph received as part of the stipulated facts shows that the portion of the house over the roof is fitted with a window, and apparently it is a part of the upstairs or attic portion of the house. Under another section of the ordinance, it is provided that the minimum horizontal distance between the line of the building and the lot line shall exclude “open porches” but the term “open porches” is not defined. What the setback is depends on whether distance is figured from the portion of the house to the rear of the porch or from the front of the main building over the porch. Under the theory of construction of the ordinance adopted by the trial court it may well be said the house closest to the street line was 23.8 feet; and the duplex being a greater distance away, its location did not violate the ordinance.
The record discloses the building permit was issued October 8, 1941. The present action was filed November 22, 1941, when the building seems to have been substantially completed. The city did not seek any restraining order, nor does it appear to have asked for any temporary injunction. When the trial was had the duplex was completed and occupied. It seems to us that it was late for the city to then contend the setback line of the residence to the north of the duplex was greater than that observed in locating the duplex.
The trial court placed weight on the fact that the city, aware of the facts, took no steps to notify Boles of its contention, but permitted him to complete the building. The city contends this is an application of the doctrine of estoppel which was not pleaded, and which in any event has no application as against the city. We shall not devote any time .to a discussion of whether the appellant’s construction of the trial court’s ruling is correct, or if correct whether it compels a judgment in the city’s favor.
The theory of the city is that the erection of the duplex at the particular location was a violation of its zoning ordinance and that as so located it constitutes a nuisance. So far as the record dis*624closes, only the city is objecting. It would appear that if there were a nuisance it was more a matter of law than of fact. What is sought in the instant action is a mandatory injunction to compel the removal of a part of the completed duplex. Issuance of the writ is analogous to that where a writ of mandamus is sought. In the latter case, the court is bound to take a broad view of the rights of the parties and of the public based upon the facts of the case, and to exercise its sound discretion in issuing or denying the writ. (See State, ex rel. v. Miami County Comm’rs, 133 Kan. 325, 326, 299 Pac. 965.) And so here, the court was entitled to review the whole situation in determining whether or not the writ should issue. It has not been made to appear that so considered the trial court abused its discretion.
For reasons heretofore set forth, we agree with the trial court's conclusions that it would be inequitable to grant the relief for which the city prays. The judgment of the trial court is affirmed.