ThinkGeo.com    |     Documentation    |     Premium Support

WFSFeatureLayer.QueryTools.GetAllFeatures bug

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


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


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


These are very urgent requirements.


Thanks.



Nelson,


Thanks for your post!
 
I tested against the GetAllFeatures in following codes, and it works fine.
 

    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();

 

Any more question just let me know.
 
Thanks.
 
Yang

 

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

 


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