Skip to content

Commit

Permalink
WMS 1.3.0 compliance: CRS:84 needs to be supported
Browse files Browse the repository at this point in the history
  • Loading branch information
mhugent authored and rldhont committed Dec 12, 2016
1 parent 46b012f commit f1cfd0c
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/server/qgsconfigparserutils.cpp
Expand Up @@ -65,6 +65,9 @@ void QgsConfigParserUtils::appendCRSElementsToLayer( QDomElement& layerElement,
appendCRSElementToLayer( layerElement, CRSPrecedingElement, crs, doc ); 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, void QgsConfigParserUtils::appendCRSElementToLayer( QDomElement& layerElement, const QDomElement& precedingElement,
Expand Down
5 changes: 5 additions & 0 deletions src/server/qgswmsserver.cpp
Expand Up @@ -2038,6 +2038,11 @@ int QgsWMSServer::configureMapRender( const QPaintDevice* paintDevice ) const
QGis::UnitType mapUnits = QGis::Degrees; QGis::UnitType mapUnits = QGis::Degrees;


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


QgsCoordinateReferenceSystem outputCRS; QgsCoordinateReferenceSystem outputCRS;


Expand Down

0 comments on commit f1cfd0c

Please sign in to comment.