Skip to content
Permalink
Browse files

Fix cherry-picking [BUGFIX][Server] WMS compliance: stretched, distor…

…t, increase, decrease
  • Loading branch information
rldhont committed Jan 3, 2017
1 parent 6140cb6 commit 5429f4af6088d6c7063726b784942fa9b583f917
Showing with 4 additions and 4 deletions.
  1. +4 −4 src/server/qgswmsserver.cpp
@@ -2001,8 +2001,8 @@ QImage* QgsWMSServer::createImage( int width, int height, bool useBbox ) const

//Adapt width / height if the aspect ratio does not correspond with the BBOX.
//Required by WMS spec. 1.3.
QString version = mParameters.value( QStringLiteral( "VERSION" ), QStringLiteral( "1.3.0" ) );
if ( useBbox && version != QLatin1String( "1.1.1" ) )
QString version = mParameters.value( "VERSION", "1.3.0" );
if ( useBbox && version != "1.1.1" )
{
bool bboxOk;
QgsRectangle mapExtent = _parseBBOX( mParameters.value( "BBOX" ), bboxOk );
@@ -2012,8 +2012,8 @@ QImage* QgsWMSServer::createImage( int width, int height, bool useBbox ) const
crs = QString( "EPSG:4326" );
mapExtent.invert();
}
QgsCoordinateReferenceSystem outputCRS = QgsCoordinateReferenceSystem::fromOgcWmsCrs( crs );
if ( outputCRS.hasAxisInverted() )
QgsCoordinateReferenceSystem outputCRS = QgsCRSCache::instance()->crsByOgcWmsCrs( crs );
if ( outputCRS.axisInverted() )
{
mapExtent.invert();
}

0 comments on commit 5429f4a

Please sign in to comment.
You can’t perform that action at this time.