Skip to content
Permalink
Browse files

WMS 1.3.0 compliance: CRS:84 needs to be supported

  • Loading branch information
mhugent authored and rldhont committed Dec 13, 2016
1 parent 4d5cc5a commit fb4775cba0a2c1828c9d36c321da8681eb66e897
Showing with 8 additions and 0 deletions.
  1. +3 −0 src/server/qgsconfigparserutils.cpp
  2. +5 −0 src/server/qgswmsserver.cpp
@@ -65,6 +65,9 @@ void QgsConfigParserUtils::appendCRSElementsToLayer( QDomElement& layerElement,
appendCRSElementToLayer( layerElement, CRSPrecedingElement, crs, doc );
}
}

//Support for CRS:84 is mandatory (equals EPSG:4326 with reversed axis)
appendCrsElementToLayer( layerElement, CRSPrecedingElement, QString( "CRS:84" ), doc );
}

void QgsConfigParserUtils::appendCRSElementToLayer( QDomElement& layerElement, const QDomElement& precedingElement,
@@ -2031,6 +2031,11 @@ int QgsWMSServer::configureMapRender( const QPaintDevice* paintDevice ) const
QGis::UnitType mapUnits = QGis::Degrees;

QString crs = mParameters.value( "CRS", mParameters.value( "SRS" ) );
if ( crs.compare( "CRS:84", Qt::CaseInsensitive ) == 0 )
{
crs = QString( "EPSG:4326" );
mapExtent.invert();
}

QgsCoordinateReferenceSystem outputCRS;

0 comments on commit fb4775c

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