https://github.com/openzim/maps
Create a ZIM file from an OpenStreetMap subset
https://github.com/openzim/maps
openstreetmap osm scraper zim
Last synced: about 2 months ago
JSON representation
Create a ZIM file from an OpenStreetMap subset
- Host: GitHub
- URL: https://github.com/openzim/maps
- Owner: openzim
- License: gpl-3.0
- Created: 2025-04-16T14:18:12.000Z (about 1 year ago)
- Default Branch: main
- Last Pushed: 2026-04-14T16:30:45.000Z (2 months ago)
- Last Synced: 2026-04-14T18:12:22.223Z (2 months ago)
- Topics: openstreetmap, osm, scraper, zim
- Language: Python
- Homepage:
- Size: 589 KB
- Stars: 15
- Watchers: 4
- Forks: 4
- Open Issues: 14
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- Contributing: CONTRIBUTING.md
- Funding: .github/FUNDING.yml
- License: LICENSE
Awesome Lists containing this project
README
# maps2zim
This scrapers creates an offline maps, based on [OpenStreetMap](https://www.openstreetmap.org/) data, in the ZIM format.
[](https://www.codefactor.io/repository/github/openzim/maps)
[](https://www.gnu.org/licenses/gpl-3.0)
[](https://codecov.io/gh/openzim/maps)
[](https://pypi.org/project/maps2zim/)
[](https://pypi.org/project/maps2zim)
[](https://ghcr.io/openzim/maps)
## Installation
Most recommended solution to run the scraper is to use pre-built Docker container.
Prerequisites are:
- [Docker](https://docs.docker.com/engine/install/) (or Docker-based engine)
- amd64 architecture
## Usage
```sh
# Get help
docker run -v output:/output ghcr.io/openzim/maps maps2zim --help
```
```sh
# Create a ZIM for Europe
docker run -v output:/output ghcr.io/openzim/maps maps2zim --include-poly=https://download.geofabrik.de/europe.poly --default-view=56.9,11.0,2.45 --name=maps_en_europe --title='Europe offline maps' --description='A ZIM with offline maps of the whole Europe area, including city search' --output=/output
```
## Advanced installation
You can also use more advanced installation:
Build your own container
1. Clone the repository locally:
```sh
git clone https://github.com/openzim/maps.git && cd maps
```
1. Build the image:
```sh
docker build -t ghcr.io/openzim/maps .
```
Run the software locally using Hatch
1. Clone the repository locally:
```sh
git clone https://github.com/openzim/maps.git && cd maps
```
1. Install [Hatch](https://hatch.pypa.io/):
```sh
pip3 install hatch
```
1. Start a hatch shell to install software and dependencies in an isolated virtual environment.
```sh
hatch shell
```
1. Run the `maps2zim` command:
```sh
maps2zim --help
```
## Developing
Use the commands below to set up the project once:
```sh
# Install hatch if it isn't installed already.
❯ pip install hatch
# Local install (in default env) / re-sync packages
❯ hatch run pip list
# Set-up pre-commit
❯ pre-commit install
```
The following commands can then be used to build and test the scraper:
```sh
# Show scripts
❯ hatch env show
# linting, testing, coverage, checking
❯ hatch run lint:all
❯ hatch run lint:fixall
# run tests
❯ hatch run test:run
# run static type checks
❯ hatch env run check:all
# building packages
❯ hatch build
```
### Contributing
This project adheres to openZIM's [Contribution Guidelines](https://github.com/openzim/overview/wiki/Contributing).
This project has implemented openZIM's [Python bootstrap, conventions and policies](https://github.com/openzim/_python-bootstrap/blob/main/docs/Policy.md) **v1.0.3**.
See details for contributions in [CONTRIBUTING.md](CONTRIBUTING.md).