He had to have had advanced knowledge of which building would have the best line-of-sight access and he had to know in advance that that building would be unguarded and unwatched.
Notice that it didn't bother him that ordinary citizens, even local LEOs could see him climb the building with his rifle and range finder. He had to know that the Secret Service had his back if somehow a message got through.
This was an orchestrated event approved and initiated from the very top.
How many people knew about and were involved in this plot?