I asked chatgpt4, and it did some insane formula that uses lat/long and the radius of the earth to measure distances, then asked it to add a bonus 20 minutes for any destination in SF, 15 minutes for any event in Berkeley/Oakland (and it correctly put bounding rectangles on the three jurisdictions).