The ruling gives the green light to a project that was first proposed in 2017 but was opposed by some residents.