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:
Project details
Release history Release notifications | RSS feed
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.3.tar.gz
(3.5 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file mvttopng-1.0.3.tar.gz.
File metadata
- Download URL: mvttopng-1.0.3.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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c2e7704c4751c7b8d6427f7da5ea501e9bded4dd4772bb3cdb437cf7ee19d8cb
|
|
| MD5 |
db03b91fcbc700ae8a03aebd8e85e5c7
|
|
| BLAKE2b-256 |
4a621e31f33fd211e93f5f27651fb9de25f7f7a60dfc7f8249d0191bdfb74269
|
File details
Details for the file mvtToPng-1.0.3-py3-none-any.whl.
File metadata
- Download URL: mvtToPng-1.0.3-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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
02ee28b5f0212a41f7262744282a415361c532bf5b84ba2a579e134491da4168
|
|
| MD5 |
fd7b5f964318b112eec2da8c16113066
|
|
| BLAKE2b-256 |
1e81e3ac75a1ef9e7d98865056e5628a0b6b51e24cdbd0a0f0891e822ecf8930
|