Metadata-Version: 2.1
Name: tile-operator
Version: 0.0.3
Summary: Tile Operation tool
Author: nokonoko1203
Author-email: nokonoko.1203.777@gmail.com
Requires-Python: >=3.7,<4.0
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.7
Classifier: Programming Language :: Python :: 3.8
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Requires-Dist: click (>=8.1.0,<9.0.0)
Requires-Dist: geopandas (>=0.12.0,<0.13.0)
Requires-Dist: matplotlib (>=3.6.0,<4.0.0)
Requires-Dist: numpy (>=1.23.0,<2.0.0)
Requires-Dist: pillow (>=9.3.0,<10.0.0)
Requires-Dist: rasterio (>=1.3.0,<2.0.0)
Requires-Dist: requests (>=2.28.0,<3.0.0)
Requires-Dist: tqdm (>=4.64.0,<5.0.0)
Description-Content-Type: text/markdown

# tile-operator

## usage

### CLI

#### tile download

```bash
$ python to.py -v download https://tile.openstreetmap.jp/{z}/{x}/{y}.png tests/data/test.geojson 18

Tile Download

 Options:
  tile_url=https://tile.openstreetmap.jp/{z}/{x}/{y}.png
  file_path=tests/data/test.geojson
  zoom_level=18


100%|███████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 30/30 [00:05<00:00,  5.11it/s]
```

#### help

```bash
$ python to.py --help        
Usage: to.py [OPTIONS] COMMAND [ARGS]...

  Tile operator v0.0.1

Options:
  --version                 Show the version and exit.
  -v, --verbose             verbose mode
  --help                    Show this message and exit.

Commands:
  operate  Tile Operation
```

### python

- install

```bash
$ pip install tile-operator
```

```python
from tile_operator.operate import TileOperate

to = TileOperate(
    tile_url="https://tile.openstreetmap.jp/{z}/{x}/{y}.png",
    file_path="tests/data/test.geojson",
    zoom_level=18,
)
to.set_tile_list()
to.download_all_tiles()
```

## test

```bash
$ pytest -qs tests
```

## development

### setup

```bash
$ poetry config virtualenvs.in-project true
$ pyenv global 3.9 # Version 3.7 or higher will work, but 3.9 is recommended.
$ python -m venv .venv
$ source .venv/bin/activate
$ python -m pip install --upgrade pip
$ poetry install
$ poetry shell
```

### publish

```bash
$ poetry build
$ poetry publish
```

