Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,5 @@ __pycache__/
.DS_Store
.venv
dist
.ruff_cache
.ruff_cache
*.mbtiles
35 changes: 22 additions & 13 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,21 +1,27 @@
# tileget

![GitHub Release](https://img.shields.io/github/v/release/Kanahiro/tileget?label=PyPI)
![GitHub Release](https://img.shields.io/github/v/release/Kanahiro/tileget)
![GitHub Actions Workflow Status](https://img.shields.io/github/actions/workflow/status/Kanahiro/tileget/lint.yml?label=lint)

Tile download utility - easily download xyz-tile data.

## installation
## Requirements

- Python >= 3.14

## Installation

```sh
pip install tileget
```

## usage
## Usage

```planetext
usage: __main__.py [-h] [-e OUTPUT_DIR] [-o OUTPUT_FILE] [--extent EXTENT EXTENT EXTENT EXTENT] [--geojson GEOJSON] [--minzoom MINZOOM] [--maxzoom MAXZOOM] [--interval INTERVAL] [--overwrite] [--timeout TIMEOUT] [--tms]
tileurl
```plaintext
usage: tileget [-h] [-e OUTPUT_DIR] [-o OUTPUT_FILE] [--extent EXTENT EXTENT EXTENT EXTENT]
[--geojson GEOJSON] [--minzoom MINZOOM] [--maxzoom MAXZOOM] [--rps RPS] [--overwrite]
[--timeout TIMEOUT] [--tms] [--retries RETRIES] [--retry-delay RETRY_DELAY]
tileurl

xyz-tile download tool

Expand All @@ -24,28 +30,31 @@ positional arguments:

options:
-h, --help show this help message and exit
-e OUTPUT_DIR, --output_dir OUTPUT_DIR
-e, --output_dir OUTPUT_DIR
output dir
-o OUTPUT_FILE, --output_file OUTPUT_FILE
-o, --output_file OUTPUT_FILE
output mbtiles file
--extent EXTENT EXTENT EXTENT EXTENT
min_lon min_lat max_lon max_lat, whitespace delimited
--geojson GEOJSON path to geojson file of Feature or FeatureCollection
--minzoom MINZOOM default to 0
--maxzoom MAXZOOM default to 16
--interval INTERVAL time taken after each-request, set as miliseconds in interger, default to 500
--rps RPS requests per second, must be positive, default to 1
--overwrite overwrite existing files
--timeout TIMEOUT wait response until this value, set as miliseconds in integer, default to 5000
--timeout TIMEOUT wait response until this value in seconds, default to 5.0
--tms if set, parse z/x/y as TMS
--retries RETRIES max retry count on error, default to 3
--retry-delay RETRY_DELAY
base delay in seconds for exponential backoff, default to 1.0
```

### examples
### Examples

```sh
# basic usage
tileget http://path/to/tile/{z}/{x}/{y}.jpg -e output_dir --extent 141.23 40.56 142.45 43.78
tileget http://path/to/tile/{z}/{x}/{y}.jpg -o output.mbtiles --geojson input.geojson

# optional arguments
tileget http://path/to/tile/{z}/{x}/{y}.jpg -e output_dir --extent 141.23 40.56 142.45 43.78 --minzoom 0 --maxzoom 16 --interval 500 --timeout 5000 --overwrite
# with rate limiting and retry options
tileget http://path/to/tile/{z}/{x}/{y}.jpg -e output_dir --extent 141.23 40.56 142.45 43.78 --minzoom 0 --maxzoom 16 --rps 5 --retries 5 --retry-delay 2.0 --timeout 10 --overwrite
```
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[project]
name = "tileget"
version = "0.4.3"
version = "1.0.0"
description = "Tile download utility - easily download xyz-tile data"
readme = "README.md"
requires-python = ">= 3.14"
Expand Down
Loading