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.4.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.4-py3-none-any.whl (3.5 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for mvttopng-1.0.4.tar.gz
Algorithm Hash digest
SHA256 97b37c75fe4f37f0e6496d5f9bf2c5ae3001bc2c02d1be6c96f82f2bfb3e3476
MD5 c6e15d5a11deab246980f36b5ae428b1
BLAKE2b-256 5cb802da7c5343088e38acce7acaa524aa5f96a5f961c1940f5c145d627e2d96

See more details on using hashes here.

File details

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

File metadata

  • Download URL: mvtToPng-1.0.4-py3-none-any.whl
  • Upload date:
  • Size: 3.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.10.12

File hashes

Hashes for mvtToPng-1.0.4-py3-none-any.whl
Algorithm Hash digest
SHA256 1e8ed92862a68a9fc5be47c0bf2290e686081df1c6dfe0a6b5a2293b49aa49c5
MD5 4af0b45264470e9a8cd166d6d9ac2124
BLAKE2b-256 dc331c45594022c30b128299b8f4d88bbdddefb0fa23b982b7f51af0e693d044

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