Planting trees to suit the environment