The meaning is quite well established and straightforward—from TheFreeDictionary:
(Lit.) The arrangement of features on an area of land. (Also with lie, especially British English.) "The surveyor mapped the lay of the land." "The geologist studied the lay of the land, trying to determine if there was oil below."
(Fig.) The arrangement or organization of something other than land. "As soon as I get the lay of the land in my new job, things will go better." "The company's corporate structure was complex, so understanding the lay of the land took time."
But what is the origin of its figurative meaning? Does it predate frontier America?