Skip to main content

A rio-tiler plugin to encode tile array to MVT

Project description

rio-tiler-mvt

Packaging status CircleCI codecov

A rio-tiler plugin to translate tile array to MVT (using python-vtzero)

More on COG Talk blog posts

Install

Requirements

rio-tiler-mvt use python-vtzero wrapper to encode point and polygons to MVT. Because VTZERO is a C++ library, python-vtzero is written in Cython, thus cython~=0.28 is required to compile this library.

$ pip install cython~=0.28 # see https://github.com/tilery/python-vtzero#requirements

$ pip install rio-tiler-mvt

Or

$ git clone http://github.com/cogeotiff/rio-tiler-mvt
$ cd rio-tiler-mvt
$ pip install -e .

Rio-tiler + Mapbox Vector tiles

API

mvt.encoder(data, mask, band_names=[], layer_name="my_layer", feature_type="point")

Inputs:

  • data : raster tile data to encode
  • mask : mask data
  • band_names : Raster band's names
  • layer_name : Layer name
  • feature_type : Feature type (point or polygon)

Returns:

  • mvt : Mapbox Vector Tile encoded data.

Contribution & Development

Issues and pull requests are more than welcome.

dev install

$ git clone https://github.com/cogeotiff/rio-tiler-mvt.git
$ cd rio-tiler-mvt
$ pip install -e .[dev]

Python3.6 only

This repo is set to use pre-commit to run flake8, pydocstring and black ("uncompromising Python code formatter") when commiting new code.

$ pre-commit install

Implementations

cogeo-mosaic

satellite-3d

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

rio-tiler-mvt-0.0.1.dev1.tar.gz (54.8 kB view details)

Uploaded Source

File details

Details for the file rio-tiler-mvt-0.0.1.dev1.tar.gz.

File metadata

  • Download URL: rio-tiler-mvt-0.0.1.dev1.tar.gz
  • Upload date:
  • Size: 54.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/40.8.0 requests-toolbelt/0.9.1 tqdm/4.32.2 CPython/3.7.2

File hashes

Hashes for rio-tiler-mvt-0.0.1.dev1.tar.gz
Algorithm Hash digest
SHA256 03134d96dd41cf59e8c981b21d9f3a3b13ca20da8499b01532baa491048a647a
MD5 62f6e9ff9edc51a12514de9caefd3e69
BLAKE2b-256 9bf26b48d33a35d13ace700d055f297aa75f58af18ce1271554214dfc43b5d6a

See more details on using hashes here.

Provenance

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page