# WFSFeatureLayer.QueryTools.GetAllFeatures bug

**URL:** <https://community.thinkgeo.com/t/wfsfeaturelayer-querytools-getallfeatures-bug/592>\
**Category:** WinForms\
**Created:** [August 6, 2009, 11:57am UTC](https://community.thinkgeo.com/t/wfsfeaturelayer-querytools-getallfeatures-bug/592 "2009-08-06T11:57:58Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Nelson](https://community.thinkgeo.com/letter_avatar_proxy/v4/letter/n/dec6dc/32.png) [@Nelson](https://community.thinkgeo.com/u/Nelson)\
**Post date:** [August 6, 2009, 11:57am UTC](https://community.thinkgeo.com/t/wfsfeaturelayer-querytools-getallfeatures-bug/592/1 "2009-08-06T11:57:58Z")

</div>

I&nbsp;noticed&nbsp;when&nbsp;doing&nbsp;WFSFeatureLayer.QueryTools.GetAllFeatures,&nbsp;it&nbsp;will&nbsp;only&nbsp;return&nbsp;all&nbsp;features&nbsp;when&nbsp;specifying&nbsp;no&nbsp;return&nbsp;columns.&nbsp;Of&nbsp;course,&nbsp;this&nbsp;returns&nbsp;no&nbsp;column&nbsp;data&nbsp;which&nbsp;does&nbsp;not&nbsp;work&nbsp;at&nbsp;all&nbsp;for&nbsp;what&nbsp;I&nbsp;am&nbsp;trying&nbsp;to&nbsp;do...

I&nbsp;am&nbsp;pretty&nbsp;sure&nbsp;WFS&nbsp;supports&nbsp;returning&nbsp;only&nbsp;certain&nbsp;attributes&nbsp;and&nbsp;at&nbsp;worst&nbsp;it&nbsp;at&nbsp;least&nbsp;supports&nbsp;returning&nbsp;all&nbsp;of&nbsp;them.&nbsp;It&nbsp;is&nbsp;highly&nbsp;important&nbsp;to&nbsp;be&nbsp;able&nbsp;to&nbsp;access&nbsp;this&nbsp;data.

I&nbsp;am&nbsp;also&nbsp;working&nbsp;on&nbsp;solutions&nbsp;for&nbsp;highlighting&nbsp;features&nbsp;from&nbsp;a&nbsp;WFS&nbsp;so&nbsp;I&nbsp;am&nbsp;hoping&nbsp;to&nbsp;be&nbsp;able&nbsp;to&nbsp;filter&nbsp;by&nbsp;attribute&nbsp;value&nbsp;which&nbsp;I&nbsp;would&nbsp;imagine&nbsp;should&nbsp;be&nbsp;supported&nbsp;but&nbsp;as&nbsp;I&nbsp;am&nbsp;trying&nbsp;to&nbsp;work&nbsp;to&nbsp;that&nbsp;point&nbsp;it&nbsp;doesn't&nbsp;seem&nbsp;to&nbsp;be&nbsp;included.

These&nbsp;are&nbsp;very&nbsp;urgent&nbsp;requirements.

Thanks.

---

<div class="post-metadata">

**Author:** ![ThinkGeo](https://community.thinkgeo.com/user_avatar/community.thinkgeo.com/thinkgeo/32/25029_2.png) [@ThinkGeo](https://community.thinkgeo.com/u/ThinkGeo)\
**Post date:** [August 6, 2009, 9:25pm UTC](https://community.thinkgeo.com/t/wfsfeaturelayer-querytools-getallfeatures-bug/592/2 "2009-08-06T21:25:31Z")

</div>

Nelson,

Thanks&nbsp;for&nbsp;your&nbsp;post!  
&nbsp;  
I&nbsp;tested&nbsp;against&nbsp;the&nbsp;GetAllFeatures&nbsp;in&nbsp;following&nbsp;codes,&nbsp;and&nbsp;it&nbsp;works&nbsp;fine.  
&nbsp;  
`	    WfsFeatureLayer wfsFeatureLayer = new WfsFeatureLayer(@"giswebservices.massgis.state.ma.us/geoserver/wfs", "GISDATA.COUNTIES_POLYM");            wfsFeatureLayer.Open();            //Collection<FeatureSourceColumn> columns = wfsFeatureLayer.QueryTools.GetColumns();            //Here return featurs with all columns.            Collection<Feature> allFeature1 = wfsFeatureLayer.QueryTools.GetAllFeatures(ReturningColumnsType.AllColumns);            //Here return features without any columns.            Collection<Feature> allFeature2 = wfsFeatureLayer.QueryTools.GetAllFeatures(ReturningColumnsType.NoColumns);            //Here return features with given specified columns.            Collection<Feature> allFeature3 = wfsFeatureLayer.QueryTools.GetAllFeatures(new string[]{"FIPS_ID"});            wfsFeatureLayer.Close();`  
&nbsp;  
  
Any&nbsp;more&nbsp;question&nbsp;just&nbsp;let&nbsp;me&nbsp;know.  
&nbsp;  
Thanks.  
&nbsp;  
Yang  
  
&nbsp;

---

<div class="post-metadata">

**Author:** ![Nelson](https://community.thinkgeo.com/letter_avatar_proxy/v4/letter/n/dec6dc/32.png) [@Nelson](https://community.thinkgeo.com/u/Nelson)\
**Post date:** [August 7, 2009, 6:55am UTC](https://community.thinkgeo.com/t/wfsfeaturelayer-querytools-getallfeatures-bug/592/3 "2009-08-07T06:55:47Z")

</div>

Yale,&nbsp;I&nbsp;think&nbsp;there&nbsp;is&nbsp;a&nbsp;big&nbsp;issue&nbsp;here&nbsp;I&nbsp;am&nbsp;noticing.&nbsp;You&nbsp;may&nbsp;need&nbsp;to&nbsp;ask&nbsp;Dave&nbsp;or&nbsp;someone&nbsp;else&nbsp;for&nbsp;feedback&nbsp;on&nbsp;it…&nbsp;  
&nbsp;&nbsp;  
&nbsp;In&nbsp;the&nbsp;past&nbsp;it&nbsp;has&nbsp;been&nbsp;necessary&nbsp;to&nbsp;analyze&nbsp;my&nbsp;XMLResponse&nbsp;in&nbsp;order&nbsp;to&nbsp;determine&nbsp;if&nbsp;the&nbsp;output&nbsp;from&nbsp;the&nbsp;WFS&nbsp;server&nbsp;type&nbsp;we&nbsp;are&nbsp;using&nbsp;is&nbsp;different&nbsp;from&nbsp;the&nbsp;ones&nbsp;you&nbsp;are&nbsp;testing&nbsp;against.&nbsp;Often&nbsp;times,&nbsp;this&nbsp;has&nbsp;been&nbsp;the&nbsp;case.&nbsp;  
&nbsp;&nbsp;  
&nbsp;It&nbsp;is&nbsp;essential&nbsp;that&nbsp;this&nbsp;work&nbsp;with&nbsp;this&nbsp;type&nbsp;of&nbsp;WFS&nbsp;because&nbsp;as&nbsp;it&nbsp;stands&nbsp;right&nbsp;now&nbsp;it&nbsp;seems&nbsp;the&nbsp;basics&nbsp;of&nbsp;the&nbsp;FeatureSource&nbsp;don’t&nbsp;seem&nbsp;to&nbsp;work&nbsp;correctly&nbsp;or&nbsp;maybe&nbsp;at&nbsp;all&nbsp;and&nbsp;simply&nbsp;saying&nbsp;"“I&nbsp;tested&nbsp;it&nbsp;and&nbsp;it&nbsp;works”&nbsp;is&nbsp;really&nbsp;not&nbsp;helpful.&nbsp;It&nbsp;must&nbsp;be&nbsp;resolved…

---

<div class="post-metadata">

**Author:** ![ThinkGeo](https://community.thinkgeo.com/user_avatar/community.thinkgeo.com/thinkgeo/32/25029_2.png) [@ThinkGeo](https://community.thinkgeo.com/u/ThinkGeo)\
**Post date:** [August 10, 2009, 3:15am UTC](https://community.thinkgeo.com/t/wfsfeaturelayer-querytools-getallfeatures-bug/592/4 "2009-08-10T03:15:52Z")

</div>

&nbsp;

Nelson,  
&nbsp;  
Yes,&nbsp;I&nbsp;agree&nbsp;it&nbsp;is&nbsp;very&nbsp;difficult&nbsp;to&nbsp;communicate&nbsp;effectively&nbsp;now.&nbsp;As&nbsp;I&nbsp;said&nbsp;in&nbsp;another&nbsp;post,&nbsp;we&nbsp;are&nbsp;now&nbsp;trying&nbsp;to&nbsp;add&nbsp;2&nbsp;events&nbsp;to&nbsp;make&nbsp;it&nbsp;easy&nbsp;to&nbsp;dig&nbsp;out&nbsp;the&nbsp;problem.  
[gis.thinkgeo.com/Support/Dis...fault.aspx](http://gis.thinkgeo.com/Support/DiscussionForums/tabid/143/aff/21/aft/6024/afv/topic/Default.aspx)  
&nbsp;  
For&nbsp;the&nbsp;above&nbsp;codes,&nbsp;I&nbsp;will&nbsp;past&nbsp;out&nbsp;the&nbsp;URLs&nbsp;sent&nbsp;to&nbsp;the&nbsp;server&nbsp;as&nbsp;well&nbsp;as&nbsp;the&nbsp;streams&nbsp;back&nbsp;from&nbsp;the&nbsp;server&nbsp;in&nbsp;the&nbsp;attachments(it&nbsp;is&nbsp;too&nbsp;large&nbsp;to&nbsp;upload&nbsp;here,I&nbsp;have&nbsp;sent&nbsp;them&nbsp;to&nbsp;you&nbsp;though&nbsp;email).  
&nbsp;  
Collection\<Feature\>&nbsp;allFeature2&nbsp;=&nbsp;wfsFeatureLayer.QueryTools.GetAllFeatures(ReturningColumnsType.NoColumns);  
[giswebservices.massgis.state.ma.us/geoserver/wfs?SERVICE=WFS&VERSION=1.0.0&REQUEST=GetFeature&TYPENAME=GISDATA.COUNTIES\_POLYM&propertyname=SHAPE](http://giswebservices.massgis.state.ma.us/geoserver/wfs?SERVICE=WFS&VERSION=1.0.0&REQUEST=GetFeature&TYPENAME=GISDATA.COUNTIES_POLYM&propertyname=SHAPE)  
Returned&nbsp;Stream:&nbsp;See&nbsp;GetAllFeaturesNoColumns.txt&nbsp;in&nbsp;attachment.&nbsp;  
&nbsp;  
Collection\<Feature\>&nbsp;allFeature3&nbsp;=&nbsp;wfsFeatureLayer.QueryTools.GetAllFeatures(new&nbsp;string[]&nbsp;{&nbsp;"FIPS\_ID"&nbsp;});  
[giswebservices.massgis.state.ma.us/geoserver/wfs?SERVICE=WFS&VERSION=1.0.0&REQUEST=GetFeature&TYPENAME=GISDATA.COUNTIES\_POLYM&propertyname=SHAPE,FIPS\_ID](http://giswebservices.massgis.state.ma.us/geoserver/wfs?SERVICE=WFS&VERSION=1.0.0&REQUEST=GetFeature&TYPENAME=GISDATA.COUNTIES_POLYM&propertyname=SHAPE,FIPS_ID)  
Returned&nbsp;Stream:&nbsp;See&nbsp;GetAllFeaturesIdColumn.txt&nbsp;in&nbsp;attachment.  
&nbsp;  
wfsFeatureLayer.QueryTools.GetAllFeatures(ReturningColumnsType.AllColumns)  
[giswebservices.massgis.state.ma.us/geoserver/wfs?SERVICE=WFS&VERSION=1.0.0&REQUEST=GetFeature&TYPENAME=GISDATA.COUNTIES\_POLYM&propertyname=SHAPE,FIPS\_ID,COUNTY,AREA\_ACRES](http://giswebservices.massgis.state.ma.us/geoserver/wfs?SERVICE=WFS&VERSION=1.0.0&REQUEST=GetFeature&TYPENAME=GISDATA.COUNTIES_POLYM&propertyname=SHAPE,FIPS_ID,COUNTY,AREA_ACRES)  
Returned&nbsp;Stream:&nbsp;See&nbsp;GetAllFeaturesAllColumns.txt&nbsp;in&nbsp;attachment  
&nbsp;  
Any&nbsp;more&nbsp;questions&nbsp;just&nbsp;let&nbsp;me&nbsp;know.  
&nbsp;  
Thanks.  
&nbsp;  
Yale
