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
| #!/bin/bash | |
| # | |
| # Script to setup a Elastic Beanstalk AMI with geospatial libraries | |
| # Author: Daniel Wiesmann, July 14, 2014 | |
| # | |
| # sh aws_ami_prep.sh > aws_ami_prep.log 2>&1 & | |
| # Go to ec2-user home directory | |
| cd /home/ec2-user |
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
| def intersection_line(x1, y1, r1, x2, y2 r2): | |
| """Calculates intersection line for two circles defined by (x1, y1, r1) and (x2, y2, r2).""" | |
| # Formulas obtained from | |
| # http://www.wolframalpha.com/input/?i=solve+x^2+%2B+y^2+%3D+pow(r,2)+ | |
| # and+%28x-a%29^2+%2B+%28y-b%29^2+%3D+pow(q,2)+for+x%2Cy | |
| # Create transformed coordinates for calculations | |
| a = x2 - x1 | |
| b = y2 - y1 | |
| (r,q) = (r1, r2) |
NewerOlder