Changed to a much smaller raster file

This commit is contained in:
Magnus Homann 2012-09-12 15:06:28 +02:00
parent 75eef25068
commit b890e1f11e
3 changed files with 27 additions and 1 deletions

View File

@ -44,9 +44,14 @@ void TestProjectionIssues::initTestCase()
QgsApplication::initQgis();
//create maplayer from testdata and add to layer registry
QFileInfo rasterFileInfo( QString( TEST_DATA_DIR ) + QDir::separator() + "issue5895_world.tif" );
QFileInfo rasterFileInfo( QString( TEST_DATA_DIR ) + QDir::separator() + "checker360by180.asc" );
mRasterLayer = new QgsRasterLayer( rasterFileInfo.filePath(),
rasterFileInfo.completeBaseName() );
// Set to WGS84
QgsCoordinateReferenceSystem sourceCRS;
sourceCRS.createFromId( 4326, QgsCoordinateReferenceSystem::EpsgCrsId );
mRasterLayer->setCrs( sourceCRS, false);
QgsMultiBandColorRenderer* rasterRenderer = new QgsMultiBandColorRenderer( mRasterLayer->dataProvider(), 2, 3, 4 );
mRasterLayer->setRenderer( rasterRenderer );

21
tests/testdata/checker360by180.asc vendored Normal file
View File

@ -0,0 +1,21 @@
NCOLS 24
NROWS 12
XLLCENTER -172.5
YLLCENTER -82.5
DX 15
DY 15
NODATA_VALUE -9999
0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1
1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0
0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1
1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0
0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1
1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0
0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1
1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0
0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1
1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0
0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1
1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0
CRS
NOTES

Binary file not shown.