This is an automated email from the git hooks/post-receive script.

sebastic-guest pushed a commit to branch master
in repository qgis.

commit 0ec24351a0d0793f33e63dbd8f1fe03c1402f537
Author: Bas Couwenberg <sebas...@xs4all.nl>
Date:   Sat Mar 1 14:41:13 2014 +0100

    Add patch from upstream release_2.2 branch: 
0001-BUG-9674-WFS-GetFeature-Request-does-not-return-feat.patch
---
 ...S-GetFeature-Request-does-not-return-feat.patch | 96 ++++++++++++++++++++++
 1 file changed, 96 insertions(+)

diff --git 
a/debian/patches/0001-BUG-9674-WFS-GetFeature-Request-does-not-return-feat.patch
 
b/debian/patches/0001-BUG-9674-WFS-GetFeature-Request-does-not-return-feat.patch
new file mode 100644
index 0000000..14ef7bb
--- /dev/null
+++ 
b/debian/patches/0001-BUG-9674-WFS-GetFeature-Request-does-not-return-feat.patch
@@ -0,0 +1,96 @@
+From 4522334bfab76030676e47037a401abdb5e6dd58 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?D'Hont=20Ren=C3=A9-Luc?= <rldh...@gmail.com>
+Date: Fri, 28 Feb 2014 17:08:06 +0100
+Subject: BUG #9674 WFS GetFeature Request does not return features
+Bug: http://hub.qgis.org/issues/9674
+Origin: 
https://github.com/qgis/QGIS/commit/4522334bfab76030676e47037a401abdb5e6dd58
+
+The GetFeature Request does not return elements.
+
+The response of the request is valid but with a bbox : 0,0,0,0 and no features.
+The simple request :
+* SERVICE=WFS
+* VERSION=1.0.0
+* REQUEST=GeTFeature
+* TYPENAME=*
+* OUTPUTFORMAT=*
+return no features.
+---
+ src/mapserver/qgsprojectparser.cpp |   28 +++++++++++++++++++---------
+ src/mapserver/qgswfsserver.cpp     |    7 ++++---
+ 2 files changed, 23 insertions(+), 12 deletions(-)
+
+--- a/src/mapserver/qgsprojectparser.cpp
++++ b/src/mapserver/qgsprojectparser.cpp
+@@ -836,7 +836,7 @@ void QgsProjectParser::describeCoverage(
+   }
+ }
+ 
+-QList<QgsMapLayer*> QgsProjectParser::mapLayerFromTypeName( const QString& 
tName, bool useCache ) const
++QList<QgsMapLayer*> QgsProjectParser::mapLayerFromTypeName( const QString& 
aTypeName, bool useCache ) const
+ {
+   QList<QgsMapLayer*> layerList;
+ 
+@@ -844,26 +844,36 @@ QList<QgsMapLayer*> QgsProjectParser::ma
+   {
+     return layerList;
+   }
+-
+   QStringList wfsLayersId = wfsLayers();
+ 
++  QStringList typeNameList;
++  if ( aTypeName != "" )
++  {
++    QStringList typeNameSplit = aTypeName.split( "," );
++    foreach ( const QString &str, typeNameSplit )
++    {
++      if ( str.contains( ":" ) )
++        typeNameList << str.section( ":", 1, 1 );
++      else
++        typeNameList << str;
++    }
++  }
++
+   foreach ( const QDomElement &elem, mProjectLayerElements )
+   {
+     QString type = elem.attribute( "type" );
+     if ( type == "vector" )
+     {
+-      QgsMapLayer *mLayer = createLayerFromElement( elem, useCache );
++      QgsMapLayer *mLayer = createLayerFromElement( elem );
+       QgsVectorLayer* layer = dynamic_cast<QgsVectorLayer*>( mLayer );
+-      if ( !layer || !wfsLayersId.contains( layer->id() ) )
+-        return layerList;
++      if ( !layer )
++        continue;
+ 
+       QString typeName = layer->name();
+       typeName = typeName.replace( " ", "_" );
+-      if ( tName == typeName )
+-      {
++
++      if ( wfsLayersId.contains( layer->id() ) && ( aTypeName == "" || 
typeNameList.contains( typeName ) ) )
+         layerList.push_back( mLayer );
+-        return layerList;
+-      }
+     }
+   }
+   return layerList;
+--- a/src/mapserver/qgswfsserver.cpp
++++ b/src/mapserver/qgswfsserver.cpp
+@@ -1015,11 +1015,12 @@ int QgsWFSServer::getFeature( QgsRequest
+     }
+ 
+   }
+-  if ( featureCounter == 0 )
+-    startGetFeature( request, format, layerCrs, &searchRect );
+ 
+   QgsMapLayerRegistry::instance()->removeAllMapLayers();
+-  endGetFeature( request, format );
++  if ( featureCounter == 0 )
++    throw QgsMapServiceException( "RequestNotWellFormed", mErrors.join( ". " 
) );
++  else
++    endGetFeature( request, format );
+ 
+   return 0;
+ }

-- 
Alioth's /usr/local/bin/git-commit-notice on 
/srv/git.debian.org/git/pkg-grass/qgis.git

_______________________________________________
Pkg-grass-devel mailing list
Pkg-grass-devel@lists.alioth.debian.org
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/pkg-grass-devel

Reply via email to