@@ -696,7 +696,7 @@ void QgsWmsCapabilities::parseLegendUrl( QDomElement const & e, QgsWmsLegendUrlP
696
696
void QgsWmsCapabilities::parseLayer ( QDomElement const & e, QgsWmsLayerProperty& layerProperty,
697
697
QgsWmsLayerProperty *parentProperty )
698
698
{
699
- QgsDebugMsg ( " entering." );
699
+ // QgsDebugMsg( "entering." );
700
700
701
701
// TODO: Delete this stanza completely, depending on success of "Inherit things into the sublayer" below.
702
702
// // enforce WMS non-inheritance rules
@@ -718,15 +718,15 @@ void QgsWmsCapabilities::parseLayer( QDomElement const & e, QgsWmsLayerProperty&
718
718
QDomElement e1 = n1.toElement (); // try to convert the node to an element.
719
719
if ( !e1 .isNull () )
720
720
{
721
- QgsDebugMsg ( " " + e1 .tagName () ); // the node really is an element.
721
+ // QgsDebugMsg( " " + e1.tagName() ); // the node really is an element.
722
722
723
723
QString tagName = e1 .tagName ();
724
724
if ( tagName.startsWith ( " wms:" ) )
725
725
tagName = tagName.mid ( 4 );
726
726
727
727
if ( tagName == " Layer" )
728
728
{
729
- QgsDebugMsg ( " Nested layer." );
729
+ // QgsDebugMsg( " Nested layer." );
730
730
731
731
QgsWmsLayerProperty subLayerProperty;
732
732
@@ -944,7 +944,7 @@ void QgsWmsCapabilities::parseLayer( QDomElement const & e, QgsWmsLayerProperty&
944
944
layerProperty.crs .clear ();
945
945
}
946
946
947
- QgsDebugMsg ( " exiting." );
947
+ // QgsDebugMsg( "exiting." );
948
948
}
949
949
950
950
@@ -1804,12 +1804,22 @@ bool QgsWmsCapabilities::shouldInvertAxisOrientation( const QString& ogcCrs )
1804
1804
bool changeXY = false ;
1805
1805
if ( !mParserSettings .ignoreAxisOrientation && ( mCapabilities .version == " 1.3.0" || mCapabilities .version == " 1.3" ) )
1806
1806
{
1807
+ // have we already checked this crs?
1808
+ if ( mCrsInvertAxis .contains ( ogcCrs ) )
1809
+ {
1810
+ // if so, return previous result to save time
1811
+ return mCrsInvertAxis [ ogcCrs ];
1812
+ }
1813
+
1807
1814
// create CRS from string
1808
1815
QgsCoordinateReferenceSystem theSrs;
1809
1816
if ( theSrs.createFromOgcWmsCrs ( ogcCrs ) && theSrs.axisInverted () )
1810
1817
{
1811
1818
changeXY = true ;
1812
1819
}
1820
+
1821
+ // cache result to speed up future checks
1822
+ mCrsInvertAxis [ ogcCrs ] = changeXY;
1813
1823
}
1814
1824
1815
1825
if ( mParserSettings .invertAxisOrientation )
0 commit comments