Skip to content

Commit

Permalink
more bugfixing in wfs provider
Browse files Browse the repository at this point in the history
git-svn-id: http://svn.osgeo.org/qgis/trunk/qgis@7117 c8812cc2-4d05-0410-92ff-de0c093fc19c
  • Loading branch information
mhugent committed Jul 30, 2007
1 parent f2b44e2 commit 6e01c05
Showing 1 changed file with 12 additions and 1 deletion.
13 changes: 12 additions & 1 deletion src/providers/wfs/qgswfsprovider.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -752,14 +752,25 @@ int QgsWFSProvider::getFeaturesFromGML2(const QDomElement& wfsCollectionElement,
//the children are the attributes
currentAttributeChild = layerNameElem.firstChild();
int attr = 0;
bool numeric = false;

while(!currentAttributeChild.isNull())
{
currentAttributeElement = currentAttributeChild.toElement();

if(currentAttributeElement.localName() != "boundedBy")
{
currentAttributeElement.text().toDouble(&numeric);
if((currentAttributeElement.localName()) != geometryAttribute) //a normal attribute
{
f->addAttribute(attr++, QVariant(currentAttributeElement.text()));
if(numeric)
{
f->addAttribute(attr++, QVariant(currentAttributeElement.text().toDouble()));
}
else
{
f->addAttribute(attr++, QVariant(currentAttributeElement.text()));
}
}
else //a geometry attribute
{
Expand Down

0 comments on commit 6e01c05

Please sign in to comment.