This already happens all the time with delivery services for the Bayview and Hunters Point neighborhoods of SF. The wording is usually something about avoiding the area "east of Interstate 280", e.g. https://www.purplestarmd.com/delivery/
If my original example is what we went with, you could because tenderloin is smack dab in SF, and it would be clearly discriminatory to pick up passengers from everywhere in SF except that one neighborhood.