Anyone who has ever owned a cat knows that no one owns a cat. They do whatever they want to do, whenever and however they want to do it. They take orders from no one. If they decide to use a dry spot in the garden as their litterbox, or a tree trunk as their scratching post, it is impossible to dissuade them. They are so smug and arrogant. It is no wonder that so many dogs dislike them.
Cats live in our homes and gardens because we are not as sensible as so many dogs are. We succumb to their charm and devious mind control techniques because they really can be adorable when they want to be. Fortunately, most of us would agree that this sort of symbiosis is mutually beneficial. An occasional delivery of a dead rodent proves that some cats actually work for a living.
As pompous as cats are, they are surprisingly tactful about their poop. Cats that are confined to a home leave it in their litterboxes, and even bury it with kitty litter that absorbs the objectionable aroma. From there, it can be collected and disposed of by human servants. In the garden, cats seem to put considerable effort in burying it out of the way, where it is less likely to offend anyone.
However, what is out of the way to a cat might not be so conveniently situated for others. The most refined and regularly watered gardens might not leave many options for cats, who prefer dusty and dry spots. There is not much to deter cats; so the best option may be to plant and occasionally water something in problematic spots, in conjunction with providing a litterbox somewhere else.
Sneaky cats sometimes use flat or parapet roofs where there is plenty of dry gravel and perhaps other dry detritus. For most single story roofs, it is nearly impossible to obstruct access; but in rare situations, it might be as simple as pruning trees and shrubbery back farther than cats will jump. Obstruction of access to the dusty dry soil of basements and crawlspaces is easier since it usually involves relatively simple repair of vent screens, access hatches or windows.