Skip to content

Instantly share code, notes, and snippets.

@jasoncartwright
Last active August 21, 2025 17:20
Show Gist options
  • Save jasoncartwright/f6e89ab95402f35b3481987626373033 to your computer and use it in GitHub Desktop.
Save jasoncartwright/f6e89ab95402f35b3481987626373033 to your computer and use it in GitHub Desktop.
def is_uk(lat_lng):
lat = float(lat_lng.split(",")[0])
lng = float(lat_lng.split(",")[1])
sw_lat = 49.1
sw_lng = -14.015517
ne_lat = 61.061
ne_lng = 2.0919117
if lat < sw_lat: return False
if lng < sw_lng: return False
if lat > ne_lat: return False
if lng > ne_lng: return False
return True
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment