类 MvtBuilder
- java.lang.Object
-
- org.wowtools.giscat.vector.mvt.MvtBuilder
-
public class MvtBuilder extends Object
mvt瓦片构造器- 作者:
- liuyu
- createdate
- 2022/4/24
-
-
构造器概要
构造器 构造器 说明 MvtBuilder(int z, int x, int y, int extent, int clipBuffer, org.locationtech.jts.geom.GeometryFactory geometryFactory)Create with the given extent value.MvtBuilder(int z, int x, int y, org.locationtech.jts.geom.GeometryFactory geometryFactory)
-
方法概要
所有方法 实例方法 具体方法 修饰符和类型 方法 说明 org.wowtools.giscat.util.analyse.BboxgetBbox()MvtLayergetOrCreateLayer(String layerName)新建或获取一个图层,不对geometry进行简化MvtLayergetOrCreateLayer(String layerName, int simplifyDistance)新建或获取一个图层,按simplifyDistance的值简化geometrybyte[]toBytes()转为 bytes
-
-
-
构造器详细资料
-
MvtBuilder
public MvtBuilder(int z, int x, int y, org.locationtech.jts.geom.GeometryFactory geometryFactory)
-
MvtBuilder
public MvtBuilder(int z, int x, int y, int extent, int clipBuffer, org.locationtech.jts.geom.GeometryFactory geometryFactory)Create with the given extent value.The extent value control how detailed the coordinates are encoded in the vector tile. 4096 is a good default, 256 can be used to reduce density.
The clip buffer value control how large the clipping area is outside of the tile for geometries. 0 means that the clipping is done at the tile border. 8 is a good default.
- 参数:
extent- a int with extent value. 4096 is a good value.clipBuffer- a int with clip buffer size for geometries. 8 is a good value.
-
-
方法详细资料
-
getOrCreateLayer
public MvtLayer getOrCreateLayer(String layerName, int simplifyDistance)
新建或获取一个图层,按simplifyDistance的值简化geometry- 参数:
layerName- 图层名simplifyDistance- 对geometry进行简化的长度,单位是瓦片像素,取值范围[0,extent+clipBuffer],为0时表示不做简化- 返回:
- 若已有同名图层则返回现有图层,否则新建一个
-
getOrCreateLayer
public MvtLayer getOrCreateLayer(String layerName)
新建或获取一个图层,不对geometry进行简化- 参数:
layerName- 图层名- 返回:
- 若已有同名图层则返回现有图层,否则新建一个
-
getBbox
public org.wowtools.giscat.util.analyse.Bbox getBbox()
-
toBytes
public byte[] toBytes()
转为 bytes- 返回:
- bytes
-
-