Skip to content
Permalink
Browse files

Remove the capability to not get geometry in WFS GetFetaure request

  • Loading branch information
rldhont committed Nov 14, 2012
1 parent da4fa9c commit 0ddc034968065046f301d260900d6e9fa46d2ef0
Showing with 3 additions and 21 deletions.
  1. +3 −21 src/mapserver/qgswfsserver.cpp
@@ -365,7 +365,6 @@ int QgsWFSServer::getFeature( QgsRequestHandler& request, const QString& format
QDomNodeList queryChildNodes = queryElem.childNodes();
if ( queryChildNodes.size() )
{
mWithGeom = false;
QStringList::const_iterator alstIt;
QList<int> idxList;
QMap<QString, int> fieldMap = provider->fieldNameMap();
@@ -387,20 +386,12 @@ int QgsWFSServer::getFeature( QgsRequestHandler& request, const QString& format
{
idxList.append( fieldIt.value() );
}
else if ( fieldName == "geometry" )
{
mWithGeom = true;
}
}
}
if ( idxList.size() > 0 || mWithGeom )
if ( idxList.size() > 0 )
{
attrIndexes = idxList;
}
else
{
mWithGeom = true;
}
}

//map extent
@@ -597,12 +588,11 @@ int QgsWFSServer::getFeature( QgsRequestHandler& request, const QString& format
mWithGeom = true;
QgsAttributeList attrIndexes = provider->attributeIndexes();
QMap<QString, QString>::const_iterator pnIt = mParameterMap.find( "PROPERTYNAME" );
if ( pnIt != mParameterMap.end() )
if ( pnIt != mParameterMap.end() && pnIt.value() != "*" )
{
QStringList attrList = pnIt.value().split( "," );
if ( attrList.size() > 0 )
{
mWithGeom = false;
QStringList::const_iterator alstIt;
QList<int> idxList;
QMap<QString, int> fieldMap = provider->fieldNameMap();
@@ -616,19 +606,11 @@ int QgsWFSServer::getFeature( QgsRequestHandler& request, const QString& format
{
idxList.append( fieldIt.value() );
}
else if ( fieldName == "geometry" )
{
mWithGeom = true;
}
}
if ( idxList.size() > 0 || mWithGeom )
if ( idxList.size() > 0 )
{
attrIndexes = idxList;
}
else
{
mWithGeom = true;
}
}
}

0 comments on commit 0ddc034

Please sign in to comment.
You can’t perform that action at this time.