一个将瓦片数组编码成MVT的Rio Tayle插件
rio-tiler-mvt的Python项目详细描述
里约热内卢瓷砖mvt
一个rio tiler插件,用于将tile数组转换为mvt(使用python vtzero)
有关COG Talk博客文章的更多信息
安装
要求
rio tiler mvt使用python-vtzero包装器将点和多边形编码为mvt。因为VT0是一个C++库,所以Python Vt0是用Cython编写的,因此需要Cython=0.28来编译这个库。
$ pip install cython~=0.28 # see https://github.com/tilery/python-vtzero#requirements $ pip install rio-tiler-mvt
或
$ git clone http://github.com/cogeotiff/rio-tiler-mvt
$ cd rio-tiler-mvt
$ pip install -e .
rio tiler+mapbox矢量平铺
api
mvt.encoder(data, mask, band_names=[], layer_name="my_layer", feature_type="point")
输入:
- 数据:要编码的光栅平铺数据
- 掩码:掩码数据
- 波段名称:光栅波段名称
- 层名称:层名称
- 要素类型:要素类型(点或多边形)
返回:
- mvt:mapbox矢量平铺编码数据。
贡献与发展
问题和拉取请求非常受欢迎。
dev安装
$ git clone https://github.com/cogeotiff/rio-tiler-mvt.git $ cd rio-tiler-mvt $ pip install -e .[dev]
仅限python3.6
此repo设置为在提交新代码时使用pre-commit
运行flake8、pydocstring和black(“不妥协的python代码格式化程序”)。
$ pre-commit install