Hello,
I need to be able to highlight features based on a particular attribute matching various different values. For instance, I may need to highlight 300+ parcels and only have a set of ID's to highlight them by. The way I am currently doing this is by looping through my string array of ID's and having to do a GetFeaturesByColumnValue with just that one match then add that feature to a collection to highlight and then iterate to my next ID. The overhead is insane.
I am running a Core 2 Quad @ 2.66Ghz and 4GB of ram and lighting up 300 parcels in this manner takes 2 minutes +/- . To do something with a 1990's era Map Objects took about 15 seconds on a machine of that era. I am not doing much in the way of elaborate syntax.
The below represents a simple excerpt of what I am trying to do. I am imagining that behind the scenes, a connection is established to the DBF, the features are filtered down to, and then the connection is closed with the collection returned. This whole process is killing the retrieval times. How can I get around this? An overload accepting an array or collection of values to match up to would be ideal.
For idCount As Integer = 0 To UIDs.Count - 1
Dim valProgress As Integer = ((idCount + 1) / UIDs.Count) * 100
backWorker.ReportProgress(valProgress)
If backWorker.CancellationPending Then
If layerToSearchSHP.IsOpen Then layerToSearchSHP.Close()
Exit For
End If
Dim fCollection As Collection(Of Feature) = layerToSearchSHP.FeatureSource.GetFeaturesByColumnValue(UID_Field, UIDs(idCount))
'Make sure somehow we don't have a duplicate or cross match and then add to our output collection
For Each feat As Feature In fCollection
If Not fCollectionToHighlight.Contains(feat) Then
fCollectionToHighlight.Add(feat)
End If
Next
Next