Skip to content

Commit 78d9713

Browse files
author
mhugent
committed
Fix a bug in the parsing of the WFS attributes definition
git-svn-id: http://svn.osgeo.org/qgis/trunk@10671 c8812cc2-4d05-0410-92ff-de0c093fc19c
1 parent 9489697 commit 78d9713

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/providers/wfs/qgswfsprovider.cpp

+2-1
Original file line numberDiff line numberDiff line change
@@ -505,7 +505,8 @@ int QgsWFSProvider::readAttributesFromSchema( QDomDocument& schemaDoc, QString&
505505
QString type = attributeElement.attribute( "type" );
506506

507507
//is it a geometry attribute?
508-
if ( type.startsWith( "gml:" ) && type.endsWith( "PropertyType" ) )
508+
//MH 090428: sometimes the <element> tags for geometry attributes have only attribute ref="gml:polygonProperty" and no name
509+
if ( (type.startsWith( "gml:" ) && type.endsWith( "PropertyType" )) || name.isEmpty() )
509510
{
510511
geometryAttribute = name;
511512
}

0 commit comments

Comments
 (0)