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.0.tar.gz (35.6 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.0-py3-none-any.whl (29.6 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: maps2zim-0.1.0.tar.gz
  • Upload date:
  • Size: 35.6 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.0.tar.gz
Algorithm Hash digest
SHA256 2711ad21830be94a342e95cccd0fe5193397c413e775b8b7b23a2ba65841d604
MD5 fcce8ec5e80a2619c93a5600e9713e12
BLAKE2b-256 19a73b1351ba18026021a7117ee2ad3dc2f8b0eff26af1fa9a362a84f2aa70c5

See more details on using hashes here.

Provenance

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

File metadata

  • Download URL: maps2zim-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 29.6 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.0-py3-none-any.whl
Algorithm Hash digest
SHA256 7478401c794b4a3397dfb8266c849e21cf82efa946315a336fd7003423950811
MD5 867923f7fee946b6ba1540920784bda0
BLAKE2b-256 e71efe4697aafe3fed034c178bdca6de49a0553f595f9ebfef442a3f52b62bd2

See more details on using hashes here.

Provenance

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