Skip to content

Commit

Permalink
Upgrade rasterio to 1.3
Browse files Browse the repository at this point in the history
  • Loading branch information
ajnisbet committed Aug 22, 2023
1 parent 299a72b commit 3d5ef96
Show file tree
Hide file tree
Showing 4 changed files with 3 additions and 13 deletions.
2 changes: 1 addition & 1 deletion opentopodata/backend.py
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ def _validate_points_lie_within_raster(xs, ys, lats, lons, bounds, res):
return sorted(oob_indices)


def _get_elevation_from_path(lats, lons, path, interpolation, use_mmap=False):
def _get_elevation_from_path(lats, lons, path, interpolation):
"""Read values at locations in a raster.
Args:
Expand Down
2 changes: 1 addition & 1 deletion requirements.in
Original file line number Diff line number Diff line change
Expand Up @@ -11,5 +11,5 @@ pytest
pytest-cov
pytest-timeout
PyYAML
rasterio<1.3.0
rasterio==1.3.8
requests
2 changes: 1 addition & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ pytest-timeout==2.1.0
# via -r requirements.in
pyyaml==6.0.1
# via -r requirements.in
rasterio==1.2.10
rasterio==1.3.8
# via -r requirements.in
requests==2.31.0
# via -r requirements.in
Expand Down
10 changes: 0 additions & 10 deletions tests/test_backend.py
Original file line number Diff line number Diff line change
Expand Up @@ -154,16 +154,6 @@ def test_bilinear_interpolation(self):
0.4, 0.3, self.geotiff_z[:2, :2]
)

def test_mmap(self):
lats = [89.6]
lons = [-179.7]
z = backend._get_elevation_from_path(
lats, lons, ETOPO1_GEOTIFF_PATH, "bilinear", use_mmap=True
)
assert pytest.approx(z[0]) == self._interp_bilinear(
0.4, 0.3, self.geotiff_z[:2, :2]
)

def test_none_outside_dataset(self):
lats = [0, 0, -90.1, 90.1]
lons = [-180.1, 180.1, 0, 0]
Expand Down

0 comments on commit 3d5ef96

Please sign in to comment.