Use a smaller input file for testing dataraster 16bsi
Also test a minor number of overviews. The aim is to make the test faster (#2470)
This commit is contained in:
parent
a54f621d98
commit
420e9bbbf6
2 changed files with 6 additions and 3 deletions
BIN
tests/data/raster/dataraster-small.tif
Normal file
BIN
tests/data/raster/dataraster-small.tif
Normal file
Binary file not shown.
|
@ -117,7 +117,8 @@ if 'pgraster' in mapnik.DatasourceCache.plugin_names() \
|
|||
# initialize test database
|
||||
postgis_setup()
|
||||
|
||||
# dataraster.tif, 2283x1913 int16 single-band
|
||||
# [old]dataraster.tif, 2283x1913 int16 single-band
|
||||
# dataraster-small.tif, 457x383 int16 single-band
|
||||
def _test_dataraster_16bsi_rendering(lbl, overview, rescale, clip):
|
||||
if rescale:
|
||||
lbl += ' Sc'
|
||||
|
@ -141,6 +142,7 @@ if 'pgraster' in mapnik.DatasourceCache.plugin_names() \
|
|||
# as base scale and multiply by the overview factor.
|
||||
# NOTE: the overview table extent only grows north and east
|
||||
pixsize = 500 # see gdalinfo dataraster.tif
|
||||
pixsize = 2497 # see gdalinfo dataraster-small.tif
|
||||
tol = pixsize * max(overview.split(',')) if overview else 0
|
||||
assert_almost_equal(env.minx, expenv.minx)
|
||||
assert_almost_equal(env.miny, expenv.miny, delta=tol)
|
||||
|
@ -201,7 +203,7 @@ if 'pgraster' in mapnik.DatasourceCache.plugin_names() \
|
|||
eq_(hexlify(im.view(255, 0,1,1).tostring()), '404040ff')
|
||||
|
||||
def _test_dataraster_16bsi(lbl, tilesize, constraint, overview):
|
||||
import_raster('../data/raster/dataraster.tif', 'dataRaster', tilesize, constraint, overview)
|
||||
import_raster('../data/raster/dataraster-small.tif', 'dataRaster', tilesize, constraint, overview)
|
||||
if constraint:
|
||||
lbl += ' C'
|
||||
if tilesize:
|
||||
|
@ -216,7 +218,8 @@ if 'pgraster' in mapnik.DatasourceCache.plugin_names() \
|
|||
def test_dataraster_16bsi():
|
||||
for tilesize in ['','256x256']:
|
||||
for constraint in [0,1]:
|
||||
for overview in ['','4','2,16']:
|
||||
#for overview in ['','4','2,16']:
|
||||
for overview in ['','2']:
|
||||
_test_dataraster_16bsi('data_16bsi', tilesize, constraint, overview)
|
||||
|
||||
# river.tiff, RGBA 8BUI
|
||||
|
|
Loading…
Reference in a new issue