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.12.tar.gz (3.6 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.12-py3-none-any.whl (3.6 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: mvttopng-1.0.12.tar.gz
  • Upload date:
  • Size: 3.6 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.12.tar.gz
Algorithm Hash digest
SHA256 54e20171300643373b6f971705f5813125a0db786686f9c781972de850363d59
MD5 39e6421cb42a10a45da629648378b91c
BLAKE2b-256 ddd9e621ae64eddab26cea1f15ff93a72e8d5d773b15d9e57df6e700bb86a01a

See more details on using hashes here.

File details

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

File metadata

  • Download URL: mvttopng-1.0.12-py3-none-any.whl
  • Upload date:
  • Size: 3.6 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.12-py3-none-any.whl
Algorithm Hash digest
SHA256 3388ba5b9227779f252a4cc8e86f124318ad30c31f3426cf8ec09983cec3d962
MD5 87b3ae3bc7403ef2835be3a653b2d71e
BLAKE2b-256 bc47fe4337823b4f733b3047019747166c1304795d3d2b06d5149fe0e91634b6

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