Take the 2-minute tour ×
Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. It's 100% free, no registration required.

In your experience, how many point features can be added to an OpenLayers vector layer (new OpenLayers.Layer.Vector("Point Layer")) before it goes unusably slow?

My use case is to display points from a database table. The user can decide which time frame to visualize. Therefore the result can be from very few to potentially 100,000s of points. I'd like to introduce a reasonable limit and warn the user if his query would return more features.

share|improve this question
    
Is there a standard browser being used? The limit will likely be different depending on which browser you're using. –  Derek Swingley Apr 23 '11 at 16:21
    
Mostly Firefox. It doesn't have to work in old IEs. –  underdark Apr 23 '11 at 17:53
1  
Rather than warn a user you could switch from requesting vector data to returning the points as a WMS / image. –  geographika Apr 24 '11 at 7:52
    
@geographika: Usually I'd do that. But the user also gets to decide which database to connect to. I'd have to know all possible databases and have them available through a WMS. They don't even have PostGIS installed, i just fetch lat/lon columns. –  underdark Apr 24 '11 at 20:16
add comment

4 Answers 4

up vote 27 down vote accepted

I don't have a definitive answer for you but you I put together a page where you can play around with different numbers of points on an OL map: http://swingley.appspot.com/maps/olpts

share|improve this answer
    
Wow, that's great! Thanks a lot. –  underdark Apr 23 '11 at 18:34
    
You're welcome! I was curious too... –  Derek Swingley Apr 23 '11 at 19:01
4  
Derek there should be 'Great Answer with practical example' badge for that. Good to see the differences in speed overlying pointss. –  Mapperz Apr 24 '11 at 4:11
    
Thanks, Mapperz! Guess I'll just have to settle for upvotes :) –  Derek Swingley Apr 24 '11 at 15:39
2  
Very interesting! It makes me think to the geoipsum. Alternatively, it can be use as well to test performance : craigmmills.com/geoipsum (I don't know if there is a polygon number limit) –  simo Apr 26 '11 at 11:53
add comment

I don't think it is not possible to give solid answer for this question. Rendering point/polygons fully depend on browser and hardware (CPU & memory) not with OpenLayers. I had problem with Openlayers and IE6 for one of the Lake (Polygon) rendering. but, it loaded nicely in Firefox. And best option would be monitor the memory and CPU usage with Chrome or some tools would be better.

share|improve this answer
add comment

If the display goes slow because of the too high feature number, it means that the data to display are not suitable for the zoom level. Usually, when the features density goes too high, the display can not be readable anymore (see this example). Even if there was no processing limit and all the display devices were able to display 1000000000000 features in 0.001s on a small screen, the visualisation would remain impossible.

The Töpfer's radix law states that feature density should remain under a constant threshold whatever the zoom level. A way to solve this issue and adapt the data to the visualisation scale is to transform it using generalisation operations like this one or this other one.

share|improve this answer
    
On the same topic: gis.stackexchange.com/q/4096/162 –  julien Apr 28 '11 at 7:52
1  
Very true. And regarding Openlayers, it uses cluster strategy to handle that. See example : openlayers.org/dev/examples/strategy-cluster.html –  simo Apr 28 '11 at 9:02
1  
For my current application, I simply connected the (GPS) points to lines (tracks). That already improves rendering time considerably. –  underdark Apr 28 '11 at 9:10
add comment

As others, I have no answer regarding that question, but applying a BBox strategy could help you keeping just the needed data since it displays only features located within the given bounding box.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.