Hello Gary,
after quite some time I got time to come back to this issue as well hoping that we can find a solution. So in the last post my complain was as follows:
1. I use a shape file.
2. This shape file is huge as it has 364988 features.
3. One column in it has the name "TrackID". But this is not the unique column.
4. What I want to do is to select all features with TrackID = x
The only way that I have found out to query it is by using:
Collection<ThinkGeo.MapSuite.Core.Feature> points = mTabLayer.FeatureSource.GetFeaturesByColumnValue("TrackID", x, ReturningColumnsType.AllColumns);
If I use this, it takes around 35 second to execute and essenatially the whole shape file is loaded in the memory of the computer (in this example I have an application memory foot print of 544.020K)
What I though you had suggested is to use the GetFeaturesByIDs providing that I had indexed my file. So I indexed my file as follows:
ShapeFileFeatureLayer.BuildIndexFile("xx.shp", "track.idx", "TrackID", "", BuildIndexMode.DoNotRebuild);
ShapeFileFeatureLayer shpLayer = new ShapeFileFeatureLayer("xx.shp","track.idx", ShapeFileReadWriteMode.ReadOnly);
And I executed this:
Collection<ThinkGeo.MapSuite.Core.Feature> points = mTabLayer.FeatureSource.GetFeaturesByIds(new String[] { trackID }, ReturningColumnsType.AllColumns);
The result is that the memory foot print is small (although it keeps on growing after every iteration which makes me believe that there is some memory leak there) the execution is fast but it does not return the TrackID but the Feature ID!!
So I am back to square one. How can I query a shape file using MapSuite for a NonID column fast and without killing my memory.
Any help will be much appreciated.
Kind Regards
Yiannis