What are the limitations of GeoServer and OpenLayers when showing a large number of points?
We are trying to show a map with a large number of points (ranging from 1000 up to 20000 depending on the users criteria) using OpenLayers and GeoServer. The points are stored in a PostgreSQL database.
Whilst the application seems to have little problem displaying the lower range, its practical limit seems to be around 5000 points. The SLD we are applying is also huge (listing all the points individually by criteria that isn’t the feature Id). At higher numbers, the image is not guaranteed to be returned, and the request sometimes crashes GeoServer, requiring the service to be reset.
Does anyone know if such a t开发者_开发技巧hing is feasible, and if so, of any configuration tips?
We have applied a btree index on the field used for filtering.
What type of layer are you adding to OpenLayers? You could use a WMS layer rather than having the points as vector features:
http://dev.openlayers.org/docs/files/OpenLayers/Layer/WMS-js.html
GeoServer would then generate an image of the points, and would only need to pass a PNG of JPEG of a few kbs rather than geometry and styling info which would be a lot larger. You'd lose some of the client-side functionality though (mouse-over events etc.)
If you are already doing this, then there may be a separate problem. 5000 points should be fine to handle on the server.
Alternatively you may want to rethink how you are diplaying the points. 5000 points at one time sounds as though it could be very confusing. Perhaps using different sized circles to represent 10, 100, 500 points etc. would be easier in terms of processing and visualisation.
精彩评论