# Ancient-map-tiler
This project aims to generate tiles data for a web view of any ancient map.  
The source image of the map may be very large. To be usable in a web view such as Leaflet it must be splitted into tiles at different zooms.  

## Usage
```shell
# (Optional) Download a large map from wikipedia
wget https://upload.wikimedia.org/wikipedia/commons/5/50/TabulaPeutingeriana.jpg


pip install ancient-map-tiler
ancient-map-tiler TabulaPeutingeriana.jpg -o tiles
```

## Development
### Prerequisites
 - python (tested on 3.13)
 - poetry
 - pre-commit

### Getting started
```shell
git clone git@gitlab.com:noan-cloarec/ancient-map-tiler.git
cd ancient-map-tiler

poetry install
pre-commit install

# Generate the tiles into a directory named tiles
poetry run ancient-map-tiler TabulaPeutingeriana.jpg -o tiles
# Open the preview in your web browser
open simple_map_preview.html
```
