leaflet加载postgis发布的矢量切片数据

之前写过使用mapbox加载矢量切片:https://www.cnblogs.com/2008nmj/p/15069842.html

那么leaflet怎么加载python+postgis发布的矢量切片服务呢?

矢量切片简介:https://blog.csdn.net/qingyafan/article/details/53367204

leaflet 添加geoserver + postgis database 发布的矢量瓦片:https://blog.csdn.net/qq_34870529/article/details/106760700

leaflet加载postgis发布的矢量切片数据_第1张图片

leaflet加载postgis发布的矢量切片数据_第2张图片

Vector tiles with dynamically updated style in Leaflet LPvis:https://eox.at/2020/01/vector-tiles-with-dynamically-updated-style-in-leaflet-lpvis/

MVT矢量瓦片全流程解析:https://zhuanlan.zhihu.com/p/54223360

MVT样式:

>>实时矢量切片和提前切好的矢量切片:

Leaflet加载矢量切片比Mapboxgl加载矢量切片速度慢:https://www.cnblogs.com/tuboshu/p/10752271.html(渲染原理?渲染引擎?格式?mapbox是webgl。。leaflet是传统的方式?)[浅谈Mapbox开源技术][MapBox GL JS性能差异的原因]

openlayer加载矢量切片:https://blog.csdn.net/weixin_40184249/article/details/83478900

Dynamic updating vs dynamic serving动态更新VS动态服务

有很多种提供矢量切片的方法。最终的选择严重地依赖于几个因素考量。首先,是有多少个用户会同时使用。第二个是数据是否会频繁的变化,更新频率必须纳入考量范围,包括属性和几何。第三个,如果用户将工作在很差的网络范围,加载几千个多边形将会是很大的问题。如果那是你面临的情况,快速地看一下Max Malynowsky在FOSS4G 2019上的讲话将会有很大的帮助。

Dynamic MVT with all parameters necessary created on the fly by a back end service (for example PostGIS and ST_AsMVT (opens new window)function) - ideal for attributes and geometries changing often or low amount of users at the same time. Even in this case, vector tiles still can and should be cached at least between data changes, unless that happens more than hourly lets say. Such an approach is well described here (opens new window).

Static MVT directly served to the user with all attributes being the originally planned use-case of vector tiles. This enables heavy caching and/or low price storage like s3. Ideal for not often changing data but also needs some extent of tailored pre-processing before. A decision needs to be made beforehand which hierarchy levels of data are displayed on which zoom to avoid extensive size increase of not well optimized geometries - for example by using a tool Tippecanoe (opens new window).

API updated Static MVT served to a user with just a geometry, which changes rarely. Other attributes used for visualization are then fetched dynamically from back end and merged with features already drawn on the client for example by a shared ID. This kind of approach can be used well during development and for data with often changing attributes. In our case of LPIS conformance checking, it would be during the process of training and improving performance of the ML classification. Server side caching of used MVT is again a good idea.

你可能感兴趣的:(Leaflet)