ThinkGeo.com    |     Documentation    |     Premium Support

GetFeaturesByColumnValues

I am working with a shapefile.  I need to get the Features that match either a portion of a column value, or match the value in multiple columns.  I looked into the QueryTools.ExecuteQuery(), but this returns a DataTable, not a Collection<Feature>.  Any suggestions or examples?


Elisa



Elisa,


Welcome you to ThinkGeo MapSuite Desktop Discussion forum. This is Yale, hope following can give you some hints.


I am sorry to say that the return value from ExecuteQuery cannot be a Collection of Feature; the reason is that the SQL query executed can only return those columns information in dbf without shape information in .shp.


So, if you want, you could use the following API instead or wrapped your own logic by querying out the shape alongside.



Collection<Feature> allFeaturesWithColumnValue = worldLayer.QueryTools.GetFeaturesByColumnValue("ColumnnName","ColumnValue")

Let me know if any more questions.


Thanks.


Yale