Skip to content

Commit

Permalink
Remove the capability to not get geometry in WFS GetFetaure request
Browse files Browse the repository at this point in the history
  • Loading branch information
rldhont committed Nov 14, 2012
1 parent da4fa9c commit 0ddc034
Showing 1 changed file with 3 additions and 21 deletions.
24 changes: 3 additions & 21 deletions src/mapserver/qgswfsserver.cpp
Expand Up @@ -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();
Expand All @@ -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
Expand Down Expand Up @@ -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();
Expand All @@ -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;
}
}
}

Expand Down

0 comments on commit 0ddc034

Please sign in to comment.