The voluntary demolition, razing, or removal of a nonconforming building or structure, including removal to the foundation of the building, shall be considered an abandonment of the nonconforming building or structure, or the nonconforming portion of such building or structure. In such an instance, a nonconforming structure or building shall not be permitted to be replaced, reconstructed, or rebuilt with another nonconforming building or part thereof in order to otherwise maintain any preexisting nonconformity.