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

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for mvttopng-1.0.13.tar.gz
Algorithm Hash digest
SHA256 f648d0f7b4161fdb17f8362f100623b6df803844019f0c612717cc27607bffbf
MD5 dd9793427ed9e18701c602b5761ae374
BLAKE2b-256 596bd4acee5c95b109b917f4768cff184ea994cf752d96a4357ebe927c070b4d

See more details on using hashes here.

Provenance

The following attestation bundles were made for mvttopng-1.0.13.tar.gz:

Publisher: python-app.yml on mkeller3/mvtToPng

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

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

File metadata

  • Download URL: mvttopng-1.0.13-py3-none-any.whl
  • Upload date:
  • Size: 3.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for mvttopng-1.0.13-py3-none-any.whl
Algorithm Hash digest
SHA256 d60303ba48a8a591c1f15a1e3369e10b41530d66f3316746cb52ac77752c8290
MD5 369d624d41411773342671d6dbb1a8a5
BLAKE2b-256 75c9e8c95a0a36b8bfe0f70e0802eced4addc5759ff157beb9a050af63683559

See more details on using hashes here.

Provenance

The following attestation bundles were made for mvttopng-1.0.13-py3-none-any.whl:

Publisher: python-app.yml on mkeller3/mvtToPng

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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