Go to the source code of this file.
|
| | parser |
| |
| | action |
| |
| | version |
| |
| | type |
| |
| | str |
| |
| | metavar |
| |
| | default |
| |
| | None |
| |
| | help |
| |
| | args = parser.parse_args() |
| |
| | gringpointlongitude = None |
| |
| | gringpointlatitude = None |
| |
| | lines = ifile.readlines() |
| |
| | key |
| |
| | value = args.lon |
| |
| | values = np.array(value.split(',')).astype(float) |
| |
| | points = list(zip(gringpointlongitude, gringpointlatitude)) |
| |
| def | center = centroidnp(points) |
| |
| | distance = np.atleast_1d(points) - np.atleast_1d(center) |
| |
| | angles = np.arctan2(distance[:,0],distance[:,1]) |
| |
| | deg_angles = np.degrees(angles) |
| |
| | idx = np.where(deg_angles < 0) |
| |
| | gringsequence = np.argsort(deg_angles, axis=0)[::-1] |
| |
| | sorted_lon = np.array2string(np.take_along_axis(np.degrees(gringpointlongitude), gringsequence, axis=0), precision=5, separator=',') |
| |
| | sorted_lat = np.array2string(np.take_along_axis(np.degrees(gringpointlatitude), gringsequence, axis=0), precision=5, separator=',') |
| |