Environmentalists have lost a legal challenge to a forestry agreement between the New South Wales and Federal Governments. The decision means logging operations can continue in a vast coastal area between Sydney and the Queensland border.