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

Uploaded Python 3

File details

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

File metadata

  • Download URL: mvttopng-1.0.11.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.11.tar.gz
Algorithm Hash digest
SHA256 44f85bbc8e0ea637286065b7c3b08b3719ec839a2ed6e7c25747ec0b48af6345
MD5 3163dd4cd4898d45e25e809f227bdbff
BLAKE2b-256 02bc13dbdcdcb58b1f7c8dd650b1267516dc7b0eeec9a92c3e798c97c1a43d0d

See more details on using hashes here.

File details

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

File metadata

  • Download URL: mvttopng-1.0.11-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.11-py3-none-any.whl
Algorithm Hash digest
SHA256 fe11662f8dbc1e7127c9f2fe9d5670f0c4b4c7208453775a07f0cb5132eff3c5
MD5 fbbf480f115ac8b48a7233a4e1a426f9
BLAKE2b-256 d8371de1eabf543f7ad9bfa9087c71c418269048c3ccff02627fb9121c438795

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