ordinances and state law are not inconsistent when they share a common purpose and are "closely related in subject matter." Allred, 487 P.2d at 487. Furthermore, a "municipal ordinance need not be identical to the controlling state statute to be consistent with it." Richfield City v. Walker, 790 P.2d 87, 90 (Utah Ct.App.1990). In this case, the fact that the language of the Salt Lake City ordinance does not mirror the state statute does not render the ordinance invalid. The common purpose of both the city ordi-nance and state law is to prohibit sexual behavior in places where the public may be affronted or offended. Compliance with the city ordinance does not preclude compliance with state law or vice versa. See Walker v. Union Pac. R.R. Co., 844 P.2d 335, 339-40 (Utah Ct.App.1992) (<HOLDING>). Accordingly, we affirm the trial court's
holding that allegations that the city arbitrarily applied a zoning ordinance were insufficient to state a substantive due process claim and stating in dicta that the decision would be the same even if the city had knowingly enforced the invalid zoning ordinance in bad faith a badfaith violation of state law remains only a violation of state law holding that the plaintiffs state law claims are preempted by federal law holding city ordinance preempted by state law because ordinance prohibited act specifically allowed under state law holding the state law claims were not preempted holding that a local gun ordinance making the sale of firearms on county property a misdemeanor was not preempted by a state law prohibiting the sale of assault weapons and unsafe handgunsfinding that the ordinance does not criminalize precisely the same acts which are prohibited by statute