Skip to main content

TileClipper Package Usage Guide

Introduction

The TileClipper package enables users to download map tiles within a specified bounding box from a tile server. This guide illustrates the installation process, instantiation of the TileClipper class, and downloading map tiles using the package.

Installation

Ensure Python is installed on your system, then install the TileClipper package using pip:

pip install tileclipper
from tileclipper import TileClipper

Instantiate TileClipper

Define the required parameters for the TileClipper class:

base_url (str): Base URL of the tile server.
bbox (list): Bounding box coordinates [minx, miny, maxx, maxy].
output_folder (str): Directory to save downloaded tiles.
max_workers (int, optional): Maximum number of concurrent workers for tile downloads (default is 10).

Create an instance of the TileClipper class:

base_url = "https://example.com/tiles/"  # Replace with your tile server URL
bbox = [xmin, ymin, xmax, ymax]  # Replace with bounding box coordinates
output_folder = "/path/to/output/folder/"  # Replace with output folder path
max_workers = 10  # Optional: Set maximum workers for concurrent downloads

tileclipper = TileClipper(base_url, bbox, output_folder, max_workers)

Download Tiles

Utilize the download_tiles(zoom_start, zoom_end) method to download tiles within a specified zoom level range:

    # Download tiles within zoom level range 18 to 20
    tileclipper.download_tiles(18, 20)

Example

Here's an example demonstrating the usage of the TileClipper class:

from tileclipper import TileClipper

base_url = "https://example.com/tiles/"
bbox = [xmin, ymin, xmax, ymax]
output_folder = "/path/to/output/folder/"
max_workers = 10

tileclipper = TileClipper(base_url, bbox, output_folder, max_workers)
tileclipper.download_tiles(18, 20)
    

Replace the placeholder values (base_url, bbox, output_folder, etc.) with your specific values according to your use case.

Release files for tileclipper 1.0.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for tileclipper 1.0.2
File Size Uploaded
tileclipper-1.0.2.tar.gz 16.1 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for tileclipper 1.0.2
File Interpreter ABI Platform
tileclipper-1.0.2-py3-none-any.whl Python 3 none any Details

Total release size: 32.4 kB

Release files / tileclipper-1.0.2.tar.gz

Download URL tileclipper-1.0.2.tar.gz
Size 16.1 kB
Tags Source
SHA-256 checksum
How to use checksums
46a2c0124dfe3a7019c04aa5646411b1fdd3f795aeb5dfdf4e5dddd7e24782d1
BLAKE2b-256 checksum
How to use checksums
b7a0953bab4064a09b06c7b87affd16cfc937fa263b65ac733b56b3e273eaa96
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/5.1.0 CPython/3.9.19

Release files / tileclipper-1.0.2-py3-none-any.whl

Download URL tileclipper-1.0.2-py3-none-any.whl
Size 16.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
86c4c7a84e668e6f8db2a49c365b91e77e16188163d769d127253db315942c84
BLAKE2b-256 checksum
How to use checksums
b98c296b71353ec457177e84ba8fb3294d2e55dcecfba0ec288183571c3a7d1f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/5.1.0 CPython/3.9.19

Release history Release notifications | RSS feed

This release

1.0.2 This release

2 release files

1.0.1

2 release files

1.0.0

2 release files

0.10

2 release files

0.8

1 release file

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page