我的github
posts - 3243,  comments - 42,  views - 158万

 

 

Dear Reader,

亲爱的读者,

One of the main goals of GeoSolutions customers is to improve performance of their geospatial server. We have been improving open source tools (e.g. GeoServer and GeoWebCache) to allow for proper dissemination of large geospatial datasets in private and public cloud environments. In this post, I highlight some tricks and tips to improve performance and I also cordially invite you to a webinar on June 10th 11:00-12:00 EDT / 15:00 GMT, led by our GeoServer lead developer Andrea Aime. Check other time zones here

GeoSolutions客户的主要目标之一是提高其地理空间服务器的性能。我们一直在改进开放源代码工具(如GeoServer和GeoWebCache),以便在私有和公共云环境中适当传播大型地理空间数据集。在本文中,我将重点介绍一些提高性能的技巧和技巧,并诚挚地邀请您参加2020年6月10日11:00-12:00 EDT/15:00 GMT的网络研讨会,研讨会由我们的GeoServer首席开发人员Andrea Aime主持。在这里查看其他时区。

We want to enable a client to play with maps backed by millions of geometries or terabytes of images. Proper configuration of GeoServer and the data, in particular for large datasets, will keep us in the happy zone!

我们希望让客户机能够使用由数百万几何图形或TB图像支持的地图。正确配置GeoServer和数据,特别是对于大型数据集,将使我们保持愉快的状态!

GeoServer has been improving over the years and more options are available to the administrators to tweak its configuration. A blog posted two years ago, provides some tweaking details. Lots of things have changed since then. For example, back then the Marlin renderer was not part of the JAVA JDK. Now it is part of JDK-9 onwards (See a JaveOne presentation from Bourges about this topic). You don’t need to do this extra configuration. If you are running on JDK-8 then follow the recommendations on the blog to improve the performance when rendering images.

GeoServer这些年一直在进步,并且管理员有更多的选项来调整其配置。两年前发布的一个博客提供了一些调整细节。但是这两年又发生了很多的改变。例如,当时Marlin渲染器不是java jdk的一部分。现在它是JDK-9以后的一部分(参见Bourges关于这个主题的JaveOne演示)。你不需要做这个额外的配置。如果您运行的是JDK-8,那么还是请继续按照上面博客上的建议来提高渲染图像时的性能。

So, what do you do if you have a ½ terabyte of OSM data and want to use it as a basemap, or you want to show on a map data from areas of interest that are tessellated in grid cells with very high resolution, or you want to cache layer groups containing thousands of GeoTIFFs (e.g. see thread on gis.stackexchange)?

那么,如果你有一个½ TB的OSM数据,并希望将其用作底图,或者希望在地图上显示在网格单元中以极高分辨率镶嵌的感兴趣区域的数据,或者希望缓存包含数千个GeoTIFF的图层组(例如,请参见gis.stackexchange上的线程)?

The strategies and tricks revolve on minimizing the work to be performed by GeoServer and the database once a request is being made. This requires preparing as much as possible data in advance, selecting best formats, caching, and other strategies.  I will provide key strategies in this post, as an introduction to the topic.

这些策略和技巧围绕着在发出请求后最小化GeoServer和数据库要执行的工作。这需要提前准备尽可能多的数据、选择最佳格式、缓存和其他策略。我将在这篇文章中提供关键策略,作为对主题的介绍。

 

 Server performance

Can I portray millions of geometries in my web client?我可以在我的web客户端中描绘数百万个几何图形吗?

Let’s say you have an area composed of 1 million geometries. You are not always going to show everything. You pick and choose what you want to present depending on the zoom levels. This can be tricky because you also need to process the attribute data from the contained geometries (e.g. adding, averaging). There is this kind of illusion that the user is getting all the data all the time. The magic is done via a smart setup on the backend to minimize the features being retrieved.  Several approaches to tackle this issue:

假设你有一个包含1百万个几何图形的区域。你并不会时刻展示所有的东西。你会根据缩放级别来选择你希望展示的东西。这可能很棘手,因为您还需要处理包含几何体的属性数据(例如,添加、平均)。存在这样一种错觉,即用户一直在获取所有数据。魔术是通过一个智能设置在后端,以尽量减少正在检索的功能。解决这一问题的几种方法:

1) Reduce the number of features being returned. You want super fast performance, present maximum 1000 features.

1)减少返回的要素的数量。你想要超快的性能,那么最多返回1000个要素。

Pre-configure and select what to show at different levels (e.g. via style optimizations). As the user zooms-in, the data presented changes. New features and new labels might show-up, while others disappear.

预配置,并且选择不同级别下的展示内容(例如,通过样式优化)。当用户放大时,展示的数据改变了。新的要素和新的标签可能展示出来,而其他的消失。

Create bigger geometries that are composed of smaller geometries. The geometries returned depend on the zoom level of the request or the information of the request. When done properly discrete grids are an incredible mechanism to compute fast analytics. A good read about this topic is the  OGC Discrete Global Grid System (DGGS). There is also related work going on, which we are helping to advance, as part of the  OGC Testbed 16.

创建由较小几何体组成的较大几何体。返回的几何图形取决于请求的缩放级别或请求的信息。如果做得好,离散网格是计算快速分析的难以置信的机制。关于这个主题的一本好书是OGC离散全球网格系统(DGGS)。作为ogctestbed16的一部分,我们正在帮助推进相关的工作。

2) Simplify the vertices of the polygon. For example, if a polygon has 500,000 vertices at a higher zoom level the same polygon can be represented in hundreds of vertices and the end user should not notice the difference. The tutorial for using GeoTools Feature-pregenralized module explains this in detail.

2) 简化多边形的顶点。例如,如果一个多边形在更高的缩放级别上有500000个顶点,那么同一个多边形可以用数百个顶点来表示,最终用户不应该注意到这一差异。使用GeoTools功能预加密模块的教程对此进行了详细说明。

Can I serve petabytes of raster data with GeoServer?我可以用GeoServer提供数PB的光栅数据吗?

The answer is yes, but you need to properly configure them. Regarding formats GeoTIFF is the champion. It is very flexible, can be tiled and can be fined tuned for performance.  

回答是可以,但是你需要合理的配置它们。关于格式,GeoTIFF是冠军。它是非常灵活的,可以平铺,可以微调性能。

How do you structure a GeoTIFF? There are several structures such as structuring the data in a Single GeoTiff, in a Mosaic or in a Pyramid.

你如何组织一个GeoTIFF?有几种结构,例如在单个GeoTiff、马赛克或金字塔中构造数据。

GeoTIFF Structures

The structure strategy basically depends on the size of the data, and the dimensions. 

结构策略基本上取决于数据的大小和维度。

  • If single granules are < 20 Gb, using Single GeoTiffs are a good choice.如果单个颗粒<20gb,则使用单个geotiff是一个不错的选择。
  • If files are > 20 Gb or you have too many dimensions (e.g. numerical models might have multiple times, elevation and others), then use ImageMosaics.如果文件大于20 Gb或有更多维度(例如,数值模型可能有多次、高程等),请使用ImageMosaics。
  • If the dataset if tremendously large and the data needs to be served at different resolutions, then ImagePyramid is the best option.如果数据集非常大,需要以不同的分辨率提供数据,那么ImagePyramid是最佳选择。

With the above approaches we have served satellite imagery covering the entire planet, as well as long time series of meteorological models, and the like, up to several petabytes of backend data.

通过上述方法,我们提供了覆盖整个地球的卫星图像,以及长时间序列的气象模型等,高达数PB的后端数据。

As said before, I have only provided some tips and tricks in this post. Don’t miss our webinar and register, so you will have the opportunity to hear more about this topic and ask anything you want to Andrea.

 如前所述,我在这篇文章中只提供了一些提示和技巧。不要错过我们的网络研讨会和注册,这样你就有机会听到更多关于这个话题,并问任何你想问的问题。

 

Hope to see you virtually on June 10th, meanwhile stay safe and keep strong!希望6月10日能见到你,同时保持疫情期间的安全和强壮!

Cordially,热忱地,

Luis路易斯

原文: https://www.geosolutionsgroup.com/news/geoserver-performance-2020-webinar/

>>相关:Serving OSM Data with GeoServer – Advanced Styling:https://www.geosolutionsgroup.com/news/geoserver-osm-webinar-1/

posted on   XiaoNiuFeiTian  阅读(1667)  评论(0编辑  收藏  举报
编辑推荐:
· 记一次.NET内存居高不下排查解决与启示
· 探究高空视频全景AR技术的实现原理
· 理解Rust引用及其生命周期标识(上)
· 浏览器原生「磁吸」效果!Anchor Positioning 锚点定位神器解析
· 没有源码,如何修改代码逻辑?
阅读排行:
· 分享4款.NET开源、免费、实用的商城系统
· 全程不用写代码,我用AI程序员写了一个飞机大战
· MongoDB 8.0这个新功能碉堡了,比商业数据库还牛
· 白话解读 Dapr 1.15:你的「微服务管家」又秀新绝活了
· 上周热点回顾(2.24-3.2)
历史上的今天:
2019-05-28 mapgis文件转shp文件转txt转发布xml
2019-05-28 Hash树——数据结构
2019-05-28 [计算机校招笔试+面试这可能不只是一篇面经]干货满满
< 2025年3月 >
23 24 25 26 27 28 1
2 3 4 5 6 7 8
9 10 11 12 13 14 15
16 17 18 19 20 21 22
23 24 25 26 27 28 29
30 31 1 2 3 4 5

点击右上角即可分享
微信分享提示