From 05c07f2bf7f759bfa2c799711f878e26bbde7d64 Mon Sep 17 00:00:00 2001 From: Nyall Dawson Date: Wed, 18 Feb 2015 17:01:45 +1100 Subject: [PATCH] Fix wfs features not adding to spatial index --- src/providers/wfs/qgswfsprovider.cpp | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/providers/wfs/qgswfsprovider.cpp b/src/providers/wfs/qgswfsprovider.cpp index 9dbbd213c9d..f04ceb5301f 100644 --- a/src/providers/wfs/qgswfsprovider.cpp +++ b/src/providers/wfs/qgswfsprovider.cpp @@ -1179,8 +1179,6 @@ int QgsWFSProvider::getFeaturesFromGML2( const QDomElement& wfsCollectionElement QDomNode currentAttributeChild; QDomElement currentAttributeElement; QgsFeature* f = 0; - unsigned char* wkb = 0; - int wkbSize = 0; mFeatureCount = 0; for ( int i = 0; i < featureTypeNodeList.size(); ++i ) @@ -1219,7 +1217,7 @@ int QgsWFSProvider::getFeaturesFromGML2( const QDomElement& wfsCollectionElement } currentAttributeChild = currentAttributeChild.nextSibling(); } - if ( wkb && wkbSize > 0 ) + if ( f->geometry() ) { //insert bbox and pointer to feature into search tree mSpatialIndex->insertFeature( *f );