ThinkGeo.com    |     Documentation    |     Premium Support

Only refresh features that have changed

I am updating our WPF ThinkGeo application to support the display of up to 20,000 features with 160 features changing every second. All 20,000 features are displayed at all times - These are my requirements and I am aware of the pixel density issue of trying to display this many features. Each feature uses a ValueStyle to display a different PNG image based on the state of the feature (up to 5 different states each with its own PNG image). I am calling LayerOverlay.Refresh(IEnumerable features) to only refresh the features that have changed. However, this call seems to generate a single extent that includes all features in the enumeration; as a result, my ValueStyle.DrawCore() override receives all features in the combined extent instead of just the features passed to Refresh(). If a feature in the upper left hand and lower right hand corner change I will be refreshing all 20,000 features just to refresh 2 features. This seems to defeat the purpose of only requesting the changed features to be refreshed. Is there someway to only refresh the features that have been changed? I have tried looping through my list of changed features and calling Refresh() for each feature but the performance is worse than refreshing all 20,000 features.

Hi Rick,

I think the focus point is performance.

In fact I think display 20000 features at the same time is not a good solution, but I think you had solved it.

And if you quickly refresh part of the features, I think you should want load all features into the InmemoryFeatureLayer if you are using other type layer for now.

And we cannot support refresh feature, for the API you required, it should works under multiply tiles mode, but for single tile mode, the map is an entire image, so all features included in current extent will be redraw.

So my suggetions are:

  1. Group the features and shows them follow your requirement.
  2. Load all features into InmemoryFeatureLayer, it get better performance.

If I missed any point please let me know.

And wish it’t helpful.

Regards,

Ethan