Skip to content

Commit

Permalink
Merge branch 'fix-bug-python312' into 'master'
Browse files Browse the repository at this point in the history
fix bug rasterio>1.4.0 with python3.12

Closes #279

See merge request 3d/demcompare!208
  • Loading branch information
duboise-cnes committed Oct 22, 2024
2 parents 6016c49 + be440b7 commit e2514f0
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions demcompare/dem_tools.py
Original file line number Diff line number Diff line change
Expand Up @@ -1011,6 +1011,10 @@ def _get_orthodromic_distance(
lon, lat = convert_pix_to_coord(
dataset["georef_transform"].data, yp, xp
)
# lon, lat is flattened in rasterio > 1.4.0, to be corrected
# quick fix, reshape after function
lon = np.reshape(lon, (ny, nx))
lat = np.reshape(lat, (ny, nx))
lonr = np.roll(lon, 1, 1)
latl = np.roll(lat, 1, 0)
# Get distance between all pixels
Expand Down

0 comments on commit e2514f0

Please sign in to comment.