Last active
November 13, 2015 14:22
-
-
Save bmoore/5e9e94be41eb4d9392c3 to your computer and use it in GitHub Desktop.
This file contains 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
# This tests whether the first point is east or west of the boundary | |
if (boundary[1] < point1[1]): | |
if (bearing < 30 and bearing > 230): | |
direction = 'Upstream' | |
else: | |
direction = 'Downstream' | |
else: | |
if (bearing < 270 and bearing > 120): | |
direction = 'Upstream' | |
else: | |
direction = 'Downstream' | |
if (boundary[1] < point1[1] and boundary[1] > point2[1]): | |
direction = 'Upstream' | |
if (boundary[1] > point1[1] and boundary[1] < point2[1]): | |
direction = 'Downstream' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment