Created
June 9, 2022 14:33
-
-
Save heathhenley/f751e90d5c939324f940728695a30d71 to your computer and use it in GitHub Desktop.
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
| import numpy as np | |
| import utm | |
| starting_lat = -16.770190621116416 | |
| starting_lon = 145.94309647258999 | |
| x, y, zone, letter = utm.from_latlon(starting_lat, starting_lon) | |
| # Scalar | |
| print(starting_lat, starting_lon, x, y) | |
| lat_scalar, lon_scalar = utm.to_latlon(x, y, zone, letter) | |
| print(lat_scalar, lon_scalar, x, y) | |
| x, y, zone, letter = utm.from_latlon(starting_lat, starting_lon) | |
| # Using np.array() | |
| x = np.array(x) # np.ones(3) * x | |
| y = np.array(y) # np.ones(3) * y | |
| print(starting_lat, starting_lon, x, y) | |
| lat_vector, lon_vector = utm.to_latlon(x, y, zone, letter) | |
| print(lat_vector, lon_vector, x, y) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment