Skip to content

Commit 0ddc034

Browse files
committed
Remove the capability to not get geometry in WFS GetFetaure request
1 parent da4fa9c commit 0ddc034

File tree

1 file changed

+3
-21
lines changed

1 file changed

+3
-21
lines changed

src/mapserver/qgswfsserver.cpp

+3-21
Original file line numberDiff line numberDiff line change
@@ -365,7 +365,6 @@ int QgsWFSServer::getFeature( QgsRequestHandler& request, const QString& format
365365
QDomNodeList queryChildNodes = queryElem.childNodes();
366366
if ( queryChildNodes.size() )
367367
{
368-
mWithGeom = false;
369368
QStringList::const_iterator alstIt;
370369
QList<int> idxList;
371370
QMap<QString, int> fieldMap = provider->fieldNameMap();
@@ -387,20 +386,12 @@ int QgsWFSServer::getFeature( QgsRequestHandler& request, const QString& format
387386
{
388387
idxList.append( fieldIt.value() );
389388
}
390-
else if ( fieldName == "geometry" )
391-
{
392-
mWithGeom = true;
393-
}
394389
}
395390
}
396-
if ( idxList.size() > 0 || mWithGeom )
391+
if ( idxList.size() > 0 )
397392
{
398393
attrIndexes = idxList;
399394
}
400-
else
401-
{
402-
mWithGeom = true;
403-
}
404395
}
405396

406397
//map extent
@@ -597,12 +588,11 @@ int QgsWFSServer::getFeature( QgsRequestHandler& request, const QString& format
597588
mWithGeom = true;
598589
QgsAttributeList attrIndexes = provider->attributeIndexes();
599590
QMap<QString, QString>::const_iterator pnIt = mParameterMap.find( "PROPERTYNAME" );
600-
if ( pnIt != mParameterMap.end() )
591+
if ( pnIt != mParameterMap.end() && pnIt.value() != "*" )
601592
{
602593
QStringList attrList = pnIt.value().split( "," );
603594
if ( attrList.size() > 0 )
604595
{
605-
mWithGeom = false;
606596
QStringList::const_iterator alstIt;
607597
QList<int> idxList;
608598
QMap<QString, int> fieldMap = provider->fieldNameMap();
@@ -616,19 +606,11 @@ int QgsWFSServer::getFeature( QgsRequestHandler& request, const QString& format
616606
{
617607
idxList.append( fieldIt.value() );
618608
}
619-
else if ( fieldName == "geometry" )
620-
{
621-
mWithGeom = true;
622-
}
623609
}
624-
if ( idxList.size() > 0 || mWithGeom )
610+
if ( idxList.size() > 0 )
625611
{
626612
attrIndexes = idxList;
627613
}
628-
else
629-
{
630-
mWithGeom = true;
631-
}
632614
}
633615
}
634616

0 commit comments

Comments
 (0)