Skip to main content

Make ZIM file with offline maps from Openstreetmap

Project description

maps2zim

This scrapers creates an offline maps, based on OpenStreetMap data, in the ZIM format.

CodeFactor License: GPL v3 codecov PyPI version shields.io PyPI - Python Version Docker

Installation

Most recommended solution to run the scraper is to use pre-built Docker container.

Prerequisites are:

  • Docker (or Docker-based engine)
  • amd64 architecture

Usage

# Get help
docker run -v output:/output ghcr.io/openzim/maps maps2zim --help
# 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:

    git clone https://github.com/openzim/maps.git && cd maps
    
  2. Build the image:

    docker build -t ghcr.io/openzim/maps .
    
Run the software locally using Hatch
  1. Clone the repository locally:

    git clone https://github.com/openzim/maps.git && cd maps
    
  2. Install Hatch:

    pip3 install hatch
    
  3. Start a hatch shell to install software and dependencies in an isolated virtual environment.

    hatch shell
    
  4. Run the maps2zim command:

    maps2zim --help
    

Developing

Use the commands below to set up the project once:

# 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:

# Show scripts hatch env show

# linting, formating, type checking hatch run qa:check-all
❯ hatch run qa:fix-all

# run tests hatch run test:run

# building packages hatch build

Contributing

This project adheres to openZIM's Contribution Guidelines.

This project has implemented openZIM's Python bootstrap, conventions and policies v2.0.0.

See details for contributions in CONTRIBUTING.md.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

maps2zim-0.2.1.tar.gz (904.0 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

maps2zim-0.2.1-py3-none-any.whl (904.4 kB view details)

Uploaded Python 3

File details

Details for the file maps2zim-0.2.1.tar.gz.

File metadata

  • Download URL: maps2zim-0.2.1.tar.gz
  • Upload date:
  • Size: 904.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for maps2zim-0.2.1.tar.gz
Algorithm Hash digest
SHA256 28eb81687680acd6ca40c9eb55cb24e47e4d7efd2dad7e92f4f033f5ebe44a6b
MD5 bf4c88bde6a86e21b84d37d2c9e1c472
BLAKE2b-256 248d79cb0456d9494a25f0c747d188dac6b4b839b905e8b782405258e2522912

See more details on using hashes here.

Provenance

The following attestation bundles were made for maps2zim-0.2.1.tar.gz:

Publisher: Publish.yml on openzim/maps

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file maps2zim-0.2.1-py3-none-any.whl.

File metadata

  • Download URL: maps2zim-0.2.1-py3-none-any.whl
  • Upload date:
  • Size: 904.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for maps2zim-0.2.1-py3-none-any.whl
Algorithm Hash digest
SHA256 7d5b552389f4ee4334ca67c827607dab4cf4bc86892687670caeb97b6a0ec0b8
MD5 e567487bb7a3785be9648632d7279ab4
BLAKE2b-256 4d11e8e10817260552c0283d67286fbd69c99cc44eb1fdcfcccd7c0db4291823

See more details on using hashes here.

Provenance

The following attestation bundles were made for maps2zim-0.2.1-py3-none-any.whl:

Publisher: Publish.yml on openzim/maps

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page