3from pyproj
import Transformer
7lons = np.linspace(-98, -70, 1000)
8lats = np.linspace(15, 35, 1000)
9LON, LAT = np.meshgrid(lons, lats)
12proj_str =
"+proj=aea +lon_0=-84 +lat_1=18.3333333 +lat_2=31.6666667 +lat_0=25 +datum=WGS84 +units=m +no_defs"
13transformer = Transformer.from_crs(
"EPSG:4326", proj_str, always_xy=
True)
14X, Y = transformer.transform(LON, LAT)
18lon_reconstructed = np.vectorize(
22lon_diff = lon_reconstructed - LON
25lat_reconstructed = np.vectorize(
29lat_diff = lat_reconstructed - LAT
test_array_within_threshold(arr, lower_threshold=-1e-8, upper_threshold=1e-8)
ellipsoidTransformInverse