若想发布自己矢量切片,除了使用mapbox推荐的工具与geoserver外还能够直接使用postgis+后端程序进行动态发布。
使用postgis动态发布矢量切片,必须使用postgis 2.4.0以上版本。需要使用以下两个函数:
ST_AsMVT
Synopsis
bytea ST_AsMVT(anyelement set row);
bytea ST_AsMVT(anyelement row, text name);
bytea ST_AsMVT(anyelement row, text name, integer extent);
bytea ST_AsMVT(anyelement row, text name, integer extent, text geom_name);
Description
Return a Mapbox Vector Tile representation of a set of rows corresponding to a Layer. Multiple calls can be concatenated to a tile with multiple Layers. Geometry is assumed to be in tile coordinate space and valid as per specification. Typically ST_AsMVTGeom can be used to transform geometry into tile coordinate space. Other row data will be encoded as attributes.
The Mapbox Vector Tile format can store features with a different set of attributes per feature. To make use of this feature supply a JSONB column in the ro