@@ -54,7 +54,7 @@ def test_decompose_bbox_with_division(valid_bbox: tuple[float, float, float, flo
5454def test_decompose_bbox_with_buffer ():
5555 """Test decompose_bbox with buffer."""
5656 bbox = (- 122.0 , 37.0 , - 121.0 , 38.0 )
57- boxes , * _ = sdem .decompose_bbox (bbox , res = 30 , pixel_max = 1000 , buff_npixels = 2 )
57+ boxes , * _ = sdem .decompose_bbox (bbox , 30 , 1000 , buff_npixels = 2 )
5858 # Check that boxes overlap due to buffer
5959 for i in range (len (boxes ) - 1 ):
6060 current_box = boxes [i ]
@@ -71,13 +71,13 @@ def test_decompose_bbox_invalid_resolution():
7171 """Test decompose_bbox with resolution larger than bbox dimension."""
7272 bbox = (- 122.001 , 37.001 , - 122.0 , 37.002 ) # Very small bbox
7373 with pytest .raises (ValueError , match = "Resolution must be less" ):
74- sdem .decompose_bbox (bbox , res = 10000 , pixel_max = 1000 )
74+ sdem .decompose_bbox (bbox , 10000 , 1000 )
7575
7676
7777def test_decompose_bbox_aspect_ratio ():
7878 """Test that decomposed boxes maintain approximate aspect ratio."""
7979 bbox = (- 122.0 , 37.0 , - 121.0 , 38.0 )
80- boxes , * _ = sdem .decompose_bbox (bbox , res = 30 , pixel_max = 1000 )
80+ boxes , * _ = sdem .decompose_bbox (bbox , 30 , 1000 )
8181
8282 # Calculate original aspect ratio
8383 orig_width = abs (bbox [2 ] - bbox [0 ])
@@ -97,7 +97,7 @@ def test_decompose_bbox_aspect_ratio():
9797def test_decompose_bbox_coverage ():
9898 """Test that decomposed boxes cover the entire original bbox."""
9999 bbox = (- 122.0 , 37.0 , - 121.0 , 38.0 )
100- boxes , * _ = sdem .decompose_bbox (bbox , res = 30 , pixel_max = 1000 )
100+ boxes , * _ = sdem .decompose_bbox (bbox , 30 , 1000 )
101101
102102 # Convert boxes to set of points for easier comparison
103103 points_covered = set ()
@@ -139,7 +139,6 @@ def test_3dep():
139139 bbox = (- 121.1 , 37.9 , - 121.0 , 38.0 )
140140 tiff_files = sdem .get_map ("Slope Degrees" , bbox , "slope_data" , 30 , pixel_max = None )
141141 tiff_files = sdem .get_map ("Slope Degrees" , bbox , "slope_data" , 30 )
142- tiff_files = sdem .get_map ("Slope Degrees" , bbox , "slope_data" , 30 )
143142 with rasterio .open (tiff_files [0 ]) as src :
144143 assert src .shape == (371 , 293 )
145144 tiff_files = sdem .get_map ("Slope Degrees" , bbox , "slope_data" , 30 , pixel_max = 80000 )
@@ -148,14 +147,6 @@ def test_3dep():
148147 shutil .rmtree ("slope_data" , ignore_errors = True )
149148
150149
151- def test_3dep_3857 ():
152- bbox = (- 121.1 , 37.9 , - 121.0 , 38.0 )
153- tiff_files = sdem .get_map ("DEM" , bbox , "data_3857" , 30 , 3857 )
154- with rasterio .open (tiff_files [0 ]) as src :
155- assert src .shape == (371 , 293 )
156- shutil .rmtree ("data_3857" , ignore_errors = True )
157-
158-
159150@pytest .fixture (scope = "session" , autouse = True )
160151def cleanup_after_all_tests ():
161152 """Run cleanup logic at the end of the entire test session."""
0 commit comments