Skip to content
Permalink
Browse files

WMS 1.3.0 compliance: If a layer bounding box is there, it is not all…

…owed to be empty (also if a layer has only one point)
  • Loading branch information
mhugent authored and rldhont committed Dec 13, 2016
1 parent 43142b8 commit 6d68e9e0543554498d5365c3acfc8305a08a8e10
Showing with 8 additions and 1 deletion.
  1. +8 −1 src/server/qgsconfigparserutils.cpp
@@ -80,14 +80,21 @@ void QgsConfigParserUtils::appendCRSElementToLayer( QDomElement& layerElement, c
layerElement.insertAfter( crsElement, precedingElement );
}

void QgsConfigParserUtils::appendLayerBoundingBoxes( QDomElement& layerElem, QDomDocument& doc, const QgsRectangle& layerExtent,
void QgsConfigParserUtils::appendLayerBoundingBoxes( QDomElement& layerElem, QDomDocument& doc, const QgsRectangle& lExtent,
const QgsCoordinateReferenceSystem& layerCRS, const QStringList &crsList, const QStringList& constrainedCrsList )
{
if ( layerElem.isNull() )
{
return;
}

QgsRectangle layerExtent = lExtent;
if ( qgsDoubleNear( layerExtent.xMinimum(), layerExtent.xMaximum() ) || qgsDoubleNear( layerExtent.yMinimum(), layerExtent.yMaximum() ) )
{
//layer bbox cannot be empty
layerExtent.grow( 0.000001 );
}

const QgsCoordinateReferenceSystem& wgs84 = QgsCRSCache::instance()->crsByAuthId( GEO_EPSG_CRS_AUTHID );

QString version = doc.documentElement().attribute( "version" );

0 comments on commit 6d68e9e

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