Metadata-Version: 2.4
Name: yoro-maps
Version: 0.1.1
Summary: Offline maps, routing, and POI for Africa — companion to yoro geocoding
Project-URL: Homepage, https://github.com/Altius-Academy-SNC/yoro-maps
Project-URL: Documentation, https://altius-academy-snc.github.io/yoro-maps
Project-URL: Repository, https://github.com/Altius-Academy-SNC/yoro-maps
Author-email: Paul Guindo <paulguindo@altius-group.ch>
License-Expression: MIT
License-File: LICENSE
Keywords: africa,maps,mbtiles,offline,osm,routing
Classifier: Development Status :: 3 - Alpha
Classifier: Framework :: Django
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3
Classifier: Topic :: Scientific/Engineering :: GIS
Requires-Python: >=3.10
Requires-Dist: httpx>=0.24
Requires-Dist: yoro>=0.2.0
Provides-Extra: all
Requires-Dist: django>=4.2; extra == 'all'
Requires-Dist: mercantile>=1.2; extra == 'all'
Requires-Dist: pyosmium>=3.6; extra == 'all'
Provides-Extra: dev
Requires-Dist: pytest-cov; extra == 'dev'
Requires-Dist: pytest>=7; extra == 'dev'
Requires-Dist: ruff; extra == 'dev'
Provides-Extra: django
Requires-Dist: django>=4.2; extra == 'django'
Provides-Extra: docs
Requires-Dist: mkdocs-material; extra == 'docs'
Requires-Dist: mkdocstrings[python]; extra == 'docs'
Provides-Extra: extract
Requires-Dist: pyosmium>=3.6; extra == 'extract'
Provides-Extra: tiles
Requires-Dist: mercantile>=1.2; extra == 'tiles'
Description-Content-Type: text/markdown

# Yoro Maps

**[Documentation](https://altius-academy-snc.github.io/yoro-maps/)** | **[PyPI](https://pypi.org/project/yoro-maps/)** | **[GitHub](https://github.com/Altius-Academy-SNC/yoro-maps)**

Offline maps, routing, and POI for Africa — companion to [yoro](https://pypi.org/project/yoro/) geocoding.

## Install

```bash
pip install yoro-maps
pip install yoro-maps[django]    # Django integration
pip install yoro-maps[tiles]     # Tile downloading
```

## Build a map database

```bash
# Download OSM data and build road graph for Mali
yoromaps download ML --output mali.yoromaps

# With map tiles (slower, ~200+ MB)
yoromaps download ML --output mali.yoromaps --tiles --zoom-max 14
```

## Route between Yoro codes

```bash
yoromaps route mali.yoromaps ML-ABC ML-XYZ
```

```python
import yoromaps

conn = yoromaps.open_db("mali.yoromaps")
result = yoromaps.route(conn, start_lat=12.6, start_lon=-8.0, end_lat=14.5, end_lon=-4.0)
print(f"{result.distance_km} km, {result.duration_min} min")
```

## Django integration

```python
# settings.py
import yoromaps

DATABASES = {
    "default": { ... },
    "maps": yoromaps.db_config("/data/mali.yoromaps"),
}

DATABASE_ROUTERS = ["yoromaps.django.router.YoroMapsRouter"]

# urls.py
urlpatterns = [
    path("maps/", include("yoromaps.django.urls")),
]
```

## License

MIT — Paul Guindo / Altius Academy SNC.
