Skip to main content

Convert a vector tile to a png.

Project description

mvtToPng

A python package to convert a vector tile to a png.

Install

pip install mvtToPng

How to use

import os

from mvtToPng import converter

DIR_PATH = os.path.dirname(os.path.realpath(__file__))
FILE_PATH = os.path.join(DIR_PATH, "states_3_2_3.pbf")
DOWNLOAD_LOCATION = f"{os.getcwd()}/downloads"

with open(FILE_PATH, 'rb') as file:
    vector_data = file.read()

converter.Converter(
    vector_tile_in_bytes=vector_data,
    z=3,
    y=2,
    x=3,
    download_path=DOWNLOAD_LOCATION,
    file_name="states"
).convert()

Example Image:

State

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

mvtToPng-0.0.1.tar.gz (3.3 kB view details)

Uploaded Source

Built Distribution

mvtToPng-0.0.1-py3-none-any.whl (5.2 kB view details)

Uploaded Python 3

File details

Details for the file mvtToPng-0.0.1.tar.gz.

File metadata

  • Download URL: mvtToPng-0.0.1.tar.gz
  • Upload date:
  • Size: 3.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.8.10

File hashes

Hashes for mvtToPng-0.0.1.tar.gz
Algorithm Hash digest
SHA256 49a4a92ca53d16d42d3ef8b865dccda3cbbee51a0bf0dc89622bef57c6edecdc
MD5 b55c6f23ed4cbefdc9ba7759337e709c
BLAKE2b-256 02cb024f77236a81faeac47a8476bdebfb683e71a4c2e8e840b4c4b58d79d008

See more details on using hashes here.

File details

Details for the file mvtToPng-0.0.1-py3-none-any.whl.

File metadata

  • Download URL: mvtToPng-0.0.1-py3-none-any.whl
  • Upload date:
  • Size: 5.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.8.10

File hashes

Hashes for mvtToPng-0.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 fb64dbfeaebeb8c044232aaa7ec930bfbd2b0afeac15bff31b2f318eb6e44f52
MD5 cdc9e710bae22e7f0258b84d235cebac
BLAKE2b-256 3cc2962041d7012afe3ff5f81fb4aaca4c2824fef898f64a6f3335e1672fa4e4

See more details on using hashes here.

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