-
-
Save bhuiyanmobasshir94/027ef2ac9a3ff1e79cad93c226571729 to your computer and use it in GitHub Desktop.
Check if lat long is inside the bounds of the continental US (box model, not shape)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# http://en.wikipedia.org/wiki/Extreme_points_of_the_United_States#Westernmost | |
top = 49.3457868 # north lat | |
left = -124.7844079 # west long | |
right = -66.9513812 # east long | |
bottom = 24.7433195 # south lat | |
def cull(l): | |
c = [] | |
for (lat, lng) in l: | |
if bottom <= lat <= top and left <= lng <= right: | |
c.append((lat, lng)) | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment