Skip to content

Commit 895b163

Browse files
committed
Update pyproj >=3.6.1
This newer versions of pyproj have a 1nm difference in the calculated elevation output, which is not large enough to matter in transformations based on parameters accurate to the mm level
1 parent e6e33f3 commit 895b163

File tree

2 files changed

+7
-2
lines changed

2 files changed

+7
-2
lines changed

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ dependencies = [
2929
"pandas >=2.2",
3030
"h5py >=3.11",
3131
"gps-timemachine >=1.1.4",
32-
"pyproj ~=3.6.1",
32+
"pyproj >=3.6.1",
3333
"shapely >=2.0.5",
3434
"pandera[mypy] ~=0.23.0",
3535
"pydantic >=2.8.2",

tests/unit/test_itrf_converter.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,12 @@ def test_transform_itrf():
4040
# https://github.com/nsidc/NSIDC-Data-Tutorials/blob/a35203f18841456d258fac3a11dc04f44f839d9d/notebooks/iceflow/corrections.ipynb
4141
assert result.latitude.to_numpy()[0] == 69.99999974953995
4242
assert result.longitude.to_numpy()[0] == -50.0000001319163
43-
assert result.elevation.to_numpy()[0] == 1.0052761882543564
43+
# Rounding to 8 decimals in a field assumed to be measured in meters is 10nm accuracy!
44+
# This rounding became necessary when pyproj updated to a newer than 3.6.1
45+
# version, leading to a difference of ~1nm in the resulting calculation.
46+
assert np.round(result.elevation.to_numpy()[0], 8) == np.round(
47+
1.0052761882543564, 8
48+
)
4449

4550

4651
def _itrf_cart_coords_to_wgs84(x, y, z):

0 commit comments

Comments
 (0)