Skip to content

Commit b890e1f

Browse files
committed
Changed to a much smaller raster file
1 parent 75eef25 commit b890e1f

File tree

3 files changed

+27
-1
lines changed

3 files changed

+27
-1
lines changed

tests/src/gui/testprojectionissues.cpp

+6-1
Original file line numberDiff line numberDiff line change
@@ -44,9 +44,14 @@ void TestProjectionIssues::initTestCase()
4444
QgsApplication::initQgis();
4545

4646
//create maplayer from testdata and add to layer registry
47-
QFileInfo rasterFileInfo( QString( TEST_DATA_DIR ) + QDir::separator() + "issue5895_world.tif" );
47+
QFileInfo rasterFileInfo( QString( TEST_DATA_DIR ) + QDir::separator() + "checker360by180.asc" );
4848
mRasterLayer = new QgsRasterLayer( rasterFileInfo.filePath(),
4949
rasterFileInfo.completeBaseName() );
50+
// Set to WGS84
51+
QgsCoordinateReferenceSystem sourceCRS;
52+
sourceCRS.createFromId( 4326, QgsCoordinateReferenceSystem::EpsgCrsId );
53+
mRasterLayer->setCrs( sourceCRS, false);
54+
5055
QgsMultiBandColorRenderer* rasterRenderer = new QgsMultiBandColorRenderer( mRasterLayer->dataProvider(), 2, 3, 4 );
5156
mRasterLayer->setRenderer( rasterRenderer );
5257

tests/testdata/checker360by180.asc

+21
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
NCOLS 24
2+
NROWS 12
3+
XLLCENTER -172.5
4+
YLLCENTER -82.5
5+
DX 15
6+
DY 15
7+
NODATA_VALUE -9999
8+
0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1
9+
1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0
10+
0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1
11+
1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0
12+
0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1
13+
1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0
14+
0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1
15+
1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0
16+
0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1
17+
1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0
18+
0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1
19+
1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0
20+
CRS
21+
NOTES

tests/testdata/issue5895_world.tif

-254 KB
Binary file not shown.

0 commit comments

Comments
 (0)