Skip to content

Commit e184886

Browse files
author
mhugent
committed
Fix for a wfs client multipolygon bug
git-svn-id: http://svn.osgeo.org/qgis/trunk/qgis@5907 c8812cc2-4d05-0410-92ff-de0c093fc19c
1 parent 535d232 commit e184886

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/providers/wfs/qgswfsprovider.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1136,7 +1136,7 @@ int QgsWFSProvider::getWkbFromGML2MultiPolygon(const QDomElement& geometryElemen
11361136
{
11371137
continue;
11381138
}
1139-
currentLinearRingElement = linearRingNodeList.at(i).toElement();
1139+
currentLinearRingElement = linearRingNodeList.at(0).toElement();
11401140
currentCoordinateList = currentLinearRingElement.elementsByTagNameNS(GML_NAMESPACE, "coordinates");
11411141
if(currentCoordinateList.size() < 1)
11421142
{
@@ -1150,16 +1150,16 @@ int QgsWFSProvider::getWkbFromGML2MultiPolygon(const QDomElement& geometryElemen
11501150

11511151
//find interior rings
11521152
QDomNodeList innerBoundaryList = currentPolygonElement.elementsByTagNameNS(GML_NAMESPACE, "innerBoundaryIs");
1153-
for(int i = 0; i < innerBoundaryList.size(); ++i)
1153+
for(int j = 0; j < innerBoundaryList.size(); ++j)
11541154
{
11551155
std::list<QgsPoint> ringCoordinates;
1156-
currentInnerBoundaryElement = innerBoundaryList.at(i).toElement();
1156+
currentInnerBoundaryElement = innerBoundaryList.at(j).toElement();
11571157
linearRingNodeList = currentOuterBoundaryElement.elementsByTagNameNS(GML_NAMESPACE, "LinearRing");
11581158
if(linearRingNodeList.size() < 1)
11591159
{
11601160
continue;
11611161
}
1162-
currentLinearRingElement = linearRingNodeList.at(i).toElement();
1162+
currentLinearRingElement = linearRingNodeList.at(j).toElement();
11631163
currentCoordinateList = currentLinearRingElement.elementsByTagNameNS(GML_NAMESPACE, "coordinates");
11641164
if(currentCoordinateList.size() < 1)
11651165
{

0 commit comments

Comments
 (0)