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, 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.

This project has implemented openZIM's Python bootstrap, conventions and policies v1.0.3.

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.1.1.tar.gz (36.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.1.1-py3-none-any.whl (30.1 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: maps2zim-0.1.1.tar.gz
  • Upload date:
  • Size: 36.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.1.1.tar.gz
Algorithm Hash digest
SHA256 a15b33212b05e1e2a0ae26d24a594e5572bf75f369c681a17810e8a3e7f58c17
MD5 421857c0cb6fee782fc1a184edf395bd
BLAKE2b-256 a50ca0c7ef338a20cab87e1cfea5d7a8ce24b99c9ac94c95270b8c876c5e35ee

See more details on using hashes here.

Provenance

The following attestation bundles were made for maps2zim-0.1.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.1.1-py3-none-any.whl.

File metadata

  • Download URL: maps2zim-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 30.1 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.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 9d6591bf9c399f98dc5821f7279050cf849df785b75c77cffc7fdad11ada0d2a
MD5 87664715e30775c387d4f3d2c13a01e9
BLAKE2b-256 218ce25859042eb55678c724d67de219d5d71fdc007042263ba19ca164772da0

See more details on using hashes here.

Provenance

The following attestation bundles were made for maps2zim-0.1.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