hello,
i am using wpf map suite 7.0 and i want to load 1 or 2 million points (latlongs or sql server geography),
but at half million my map is getting freezing ,is there any way i can load points faster and load huge data.
i tried MsSql2008FeatureLayer it is terribily slow with points.
i tried adding points to a featurelayer - its a bit faster but at half million i am struck.
i also tried clustering which is very slow at 200K points .I don’t know why.
i’ll appreciate a little help.
thanks for answers.
Loading a million points on map
Hi Lalitya,
Welcome to join in the Map Suite forums!
To make things clearly, do you want to load millions points in a view at one time? In Wpf Edition, it only render the features(points) in the current view, which means if the current view extent is smaller, the drawn feature is less and performance is better. So, if the millions points load in a view, I am afraid both MsSql2008FeatureLayer and featurelayer are hardly to work with them like you have tried.
Could let us know how you cluster the points? By following with the ClusterPointStyle from our code community?
Thanks,
Johnny
Hi Johnny,
Thanks for your reply and pardon for my late reply,
Yes, I want to load Millions of points in a shot.
that rendering feature is good, it might give me some ideas for implementation.
For ClusterPointStyle I have taken the sample you have provided,i think algorithm to calculate those clusters count is slow.
Is there any possibility that i can show counts for individual states(like male count yellow marker,female count green marker with counts) for all states after zoom in or clicking marker show all points for that state.
If i show like this how can i show multiple states at same time??
could you please tell the limitation of number of points i can load safely, so i can prepare my design.
Hi lalitya,
I guess there are 2 options that you can consider:
option 1: If these point data don’t change following the time, I think you can load all these data into a ShapeFile(.shp), and then create the cached tile images using the “Tile Cache Generator for Map Suite” tool to save them as image files. It will be much faster when working with Map.
Option 2: Just as you mentioned, use the markers to load them instead, but the problem is that all the makers in Wpf work as an element in wpf element tree, in other words, it will be much slower than rendering with images. I think a workaround is the way you mentioned: just loading few markers at the very high zoom level, actually, to some extent, it’s a kind of Cluster. Just like we have done in the ClusterPointStyle. It should be a good idea, but it still have the same issue that maybe the algorithm to calculate those clusters count is slow. You can have a evaluation and then we can have a talk on this.
Also can you give me more details on your project? such where the point data read from, what’s the scenario etc. so that I can think more about it.
Looking forward to your further information.
Thanks,
Johnny
Hi Johnny,
thanks for the quick reply.
1)
I am loading those points from lat longs in local sql server database.
and I do operations like selecting those points using polygons(circle, square etc…),
with millions of poins its getting difficult.
2)
can you suggest a tool to reduce the size of my shapefiles or spatial data(less no. of polygons)
Hi Lalitya,
Thanks for your further information, based on your requirement, I guess we can optimize the performance following the steps as following:
1. Since you just need to do the query with the geometries, I think we can import the SQL Server data into a ShapeFile without any columns information, just including the geometry information, please make sure build the index for the created shapefile.
2. Using the “Tile Cache Generator for Map Suite” I mentioned create the point layer tile cache images. and then apply the cache to the LayerOverlay which just include a Point Layer. This LayerOverlay will just be charge of the point rendering. It can based on the SQL Server database.
3. Do the query against the ShapeFile, which has the index file based on RTree, it should be very fast for just doing the query. Please make sure don’t add the layer based on ShapeFile into a layerOverlay of the map.
On how to import the SQL Server data into a shapeFile, please try creating a tool to read all the features from SQL Server one by one and then write it into the created shapefile one by one.
If any questions, please feel free to let us know.
Thank,
Johnny