Skip to content

Commit 0c49391

Browse files
committed
Fix cherry-picking [BUGFIX][Server] WMS compliance: stretched, distort, increase, decrease
1 parent a693521 commit 0c49391

1 file changed

Lines changed: 5 additions & 5 deletions

File tree

‎src/server/qgswmsserver.cpp‎

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1994,19 +1994,19 @@ QImage* QgsWMSServer::createImage( int width, int height, bool useBbox ) const
19941994

19951995
//Adapt width / height if the aspect ratio does not correspond with the BBOX.
19961996
//Required by WMS spec. 1.3.
1997-
QString version = mParameters.value( QStringLiteral( "VERSION" ), QStringLiteral( "1.3.0" ) );
1998-
if ( useBbox && version != QLatin1String( "1.1.1" ) )
1997+
QString version = mParameters.value( "VERSION", "1.3.0" );
1998+
if ( useBbox && version != "1.1.1" )
19991999
{
20002000
bool bboxOk;
20012001
QgsRectangle mapExtent = _parseBBOX( mParameters.value( "BBOX" ), bboxOk );
2002-
QString crs = mParameters.value( QStringLiteral( "CRS" ), mParameters.value( QStringLiteral( "SRS" ) ) );
2002+
QString crs = mParameters.value( "CRS", mParameters.value( "SRS" ) );
20032003
if ( crs.compare( "CRS:84", Qt::CaseInsensitive ) == 0 )
20042004
{
20052005
crs = QString( "EPSG:4326" );
20062006
mapExtent.invert();
20072007
}
2008-
QgsCoordinateReferenceSystem outputCRS = QgsCoordinateReferenceSystem::fromOgcWmsCrs( crs );
2009-
if ( outputCRS.hasAxisInverted() )
2008+
QgsCoordinateReferenceSystem outputCRS = QgsCRSCache::instance()->crsByAuthId( crs );
2009+
if ( outputCRS.axisInverted() )
20102010
{
20112011
mapExtent.invert();
20122012
}

0 commit comments

Comments
 (0)