Skip to content

Commit

Permalink
wms provider: fix WMTS bounding box calculation for crs with inverted…
Browse files Browse the repository at this point in the history
… axis
  • Loading branch information
jef-n committed Feb 25, 2014
1 parent 07516fc commit 6b6e5eb
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion src/providers/wms/qgswmscapabilities.cpp
Expand Up @@ -1404,8 +1404,18 @@ void QgsWmsCapabilities::parseWMTSContents( QDomElement const &e )
QgsCoordinateReferenceSystem crs;
crs.createFromOgcWmsCrs( bb.crs );
if ( crs.isValid() )
{
bb.crs = crs.authid();
l.boundingBoxes << bb;

bool invert = !mParserSettings.ignoreAxisOrientation && crs.axisInverted();
if ( mParserSettings.invertAxisOrientation )
invert = !invert;

if ( invert )
bb.box.invert();

l.boundingBoxes << bb;
}
}
}
}
Expand Down

0 comments on commit 6b6e5eb

Please sign in to comment.