@@ -209,16 +209,16 @@ def test_validate_zoom():
209
209
210
210
211
211
def test_place ():
212
- expected_bbox = [- 105.3014509 , 39.9643513 , - 105.1780988 , 40.094409 ]
212
+ expected_bbox = [- 105.430545 , 39.8549856 , - 105.110545 , 40.1749856 ]
213
213
expected_bbox_map = [
214
214
- 11740727.544603072 ,
215
- - 11701591.786121061 ,
216
- 4852834.0517692715 ,
217
- 4891969.810251278 ,
215
+ - 11662456.027639052 ,
216
+ 4774562.53480525 ,
217
+ 4931105.568733288 ,
218
218
]
219
- expected_zoom = 10
219
+ expected_zoom = 9
220
220
loc = ctx .Place (SEARCH , zoom_adjust = ADJUST )
221
- assert loc .im .shape == (256 , 256 , 4 )
221
+ assert loc .im .shape == (512 , 256 , 4 )
222
222
loc # Make sure repr works
223
223
224
224
# Check auto picks are correct
@@ -298,11 +298,11 @@ def test_add_basemap():
298
298
ctx .add_basemap (ax , source = "./test2.tif" , reset_extent = True )
299
299
300
300
assert_array_almost_equal (subset , ax .images [0 ].get_extent ())
301
- assert ax .images [0 ].get_array ().sum () == 12489346
302
- assert ax .images [0 ].get_array ()[:,:,:3 ].sum () == 8440966
303
- assert ax .images [0 ].get_array ().shape == (126 , 126 , 4 )
304
- assert_array_almost_equal (ax .images [0 ].get_array ()[:,:,:3 ].mean (), 177.22696733014195 )
305
- assert_array_almost_equal (ax .images [0 ].get_array ().mean (), 196.670225 )
301
+ assert ax .images [0 ].get_array ().sum () == 3187219
302
+ assert ax .images [0 ].get_array ()[:,:,:3 ].sum () == 2175124
303
+ assert ax .images [0 ].get_array ().shape == (64 , 64 , 4 )
304
+ assert_array_almost_equal (ax .images [0 ].get_array ()[:,:,:3 ].mean (), 177.01204427083334 )
305
+ assert_array_almost_equal (ax .images [0 ].get_array ().mean (), 194.53240966796875 )
306
306
## Full read
307
307
f , ax = matplotlib .pyplot .subplots (1 )
308
308
ax .set_xlim (x1 , x2 )
@@ -311,17 +311,17 @@ def test_add_basemap():
311
311
ctx .add_basemap (ax , source = "./test2.tif" , reset_extent = False )
312
312
313
313
raster_extent = (
314
- - 11740803.981631357 ,
315
- - 11701668.223149346 ,
316
- 4852910.488797557 ,
317
- 4892046.247279563 ,
314
+ - 11740880.418659642 ,
315
+ - 11662608.901695622 ,
316
+ 4774715.408861821 ,
317
+ 4931258.442789858 ,
318
318
)
319
319
assert_array_almost_equal (raster_extent , ax .images [0 ].get_extent ())
320
- assert ax .images [0 ].get_array ()[:,:,:3 ].sum () == 34840247
321
- assert ax .images [0 ].get_array ().sum () == 51551927
322
- assert ax .images [0 ].get_array ().shape == (256 , 256 , 4 )
323
- assert_array_almost_equal (ax .images [0 ].get_array ()[:,:,:3 ].mean (), 177.20665995279947 )
324
- assert_array_almost_equal (ax .images [0 ].get_array ().mean (), 196.654995 )
320
+ assert ax .images [0 ].get_array ()[:,:,:3 ].sum () == 76248416
321
+ assert ax .images [0 ].get_array ().sum () == 109671776
322
+ assert ax .images [0 ].get_array ().shape == (512 , 256 , 4 )
323
+ assert_array_almost_equal (ax .images [0 ].get_array ()[:,:,:3 ].mean (), 193.90974934895834 )
324
+ assert_array_almost_equal (ax .images [0 ].get_array ().mean (), 209.18231201171875 )
325
325
326
326
# Test with auto-zoom
327
327
f , ax = matplotlib .pyplot .subplots (1 )
0 commit comments