Skip to content

Commit 1cb8bfc

Browse files
author
mhugent
committedJul 30, 2007
more bugfixing in wfs provider
git-svn-id: http://svn.osgeo.org/qgis/trunk@7117 c8812cc2-4d05-0410-92ff-de0c093fc19c
1 parent 2f3cee8 commit 1cb8bfc

File tree

1 file changed

+12
-1
lines changed

1 file changed

+12
-1
lines changed
 

‎src/providers/wfs/qgswfsprovider.cpp

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -752,14 +752,25 @@ int QgsWFSProvider::getFeaturesFromGML2(const QDomElement& wfsCollectionElement,
752752
//the children are the attributes
753753
currentAttributeChild = layerNameElem.firstChild();
754754
int attr = 0;
755+
bool numeric = false;
756+
755757
while(!currentAttributeChild.isNull())
756758
{
757759
currentAttributeElement = currentAttributeChild.toElement();
760+
758761
if(currentAttributeElement.localName() != "boundedBy")
759762
{
763+
currentAttributeElement.text().toDouble(&numeric);
760764
if((currentAttributeElement.localName()) != geometryAttribute) //a normal attribute
761765
{
762-
f->addAttribute(attr++, QVariant(currentAttributeElement.text()));
766+
if(numeric)
767+
{
768+
f->addAttribute(attr++, QVariant(currentAttributeElement.text().toDouble()));
769+
}
770+
else
771+
{
772+
f->addAttribute(attr++, QVariant(currentAttributeElement.text()));
773+
}
763774
}
764775
else //a geometry attribute
765776
{

0 commit comments

Comments
 (0)
Please sign in to comment.