A safety fence shall be installed around all underground swimming pools. A safety fence shall be installed around all above-ground swimming pools when the above-ground swimming pool is accessory to a single-family dwelling. A safety fence is required if the pool is both greater than 24 inches in depth and more than 5,000 gallons in capacity. A safety fence at least four (4) but no more than six (6) feet in height shall be constructed to completely enclose an inground swimming pool. A safety fence of at least four (4) but no more than six (6) feet height shall be constructed to completely enclose an above ground swimming pool or the sides of the pool above grade shall be a minimum of four (4) feet in height.