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-1.0.10.tar.gz (3.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

mvttopng-1.0.10-py3-none-any.whl (3.6 kB view details)

Uploaded Python 3

File details

Details for the file mvttopng-1.0.10.tar.gz.

File metadata

  • Download URL: mvttopng-1.0.10.tar.gz
  • Upload date:
  • Size: 3.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.10.12

File hashes

Hashes for mvttopng-1.0.10.tar.gz
Algorithm Hash digest
SHA256 5c5c70f83dd32fa5ac175369149cde7f826b0c3b8147ba04360ea2995f6dd63d
MD5 ff3ab83652460cff58a7c297b09b6a0d
BLAKE2b-256 b21d54a4ce788c3ee81a0414cb788276df6de35009cf66ab2522381af9b8ae33

See more details on using hashes here.

File details

Details for the file mvttopng-1.0.10-py3-none-any.whl.

File metadata

  • Download URL: mvttopng-1.0.10-py3-none-any.whl
  • Upload date:
  • Size: 3.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.10.12

File hashes

Hashes for mvttopng-1.0.10-py3-none-any.whl
Algorithm Hash digest
SHA256 2c1bce24d80e3ba12c8934991a2b45c07877bea3561df2024db3dc3ff634c4b7
MD5 19b2a448906edc590ac2bae0e34cad64
BLAKE2b-256 797b8b97c8ea8a2062e7f0c4709b67fa6636a6ea9d707ea713deabfc23795b22

See more details on using hashes here.

Supported by

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