显示大量点时,GeoServer 和 OpenLayers 有哪些限制?

发布于 2024-08-18 10:33:45 字数 303 浏览 4 评论 0 原文

我们正在尝试使用 OpenLayers 和 GeoServer 显示包含大量点(范围从 1000 到 20000,具体取决于用户标准)的地图。这些点存储在 PostgreSQL 数据库中。

虽然应用程序在显示较低范围时似乎没有什么问题,但其实际限制似乎在 5000 点左右。我们应用的 SLD 也很大(按非特征 ID 的标准单独列出所有点)。如果数字较高,则无法保证返回图像,并且请求有时会导致 GeoServer 崩溃,需要重置服务。

有谁知道这样的事情是否可行,如果可行,有什么配置技巧吗?

我们在用于过滤的字段上应用了 btree 索引。

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 thing is feasible, and if so, of any configuration tips?

We have applied a btree index on the field used for filtering.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

予囚 2024-08-25 10:33:45

您要向 OpenLayers 添加什么类型的图层?
您可以使用 WMS 图层,而不是将点作为矢量特征:

http://dev.openlayers.org/docs/files/OpenLayers/Layer/WMS-js.html

GeoServer 然后会生成点的图像,并且只需要传递一个 JPEG 的 PNG几kb,而不是几何和样式信息,后者要大得多。不过,您会失去一些客户端功能(鼠标悬停事件等)。

如果您已经这样做了,那么可能会有一个单独的问题。 5000点应该可以在服务器上处理。

或者,您可能需要重新考虑如何表达这些观点。一次5000点听起来似乎很混乱。也许使用不同大小的圆圈来表示 10、100、500 点等在处理和可视化方面会更容易。

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.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文