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.2.0.tar.gz (972.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.2.0-py3-none-any.whl (977.0 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: maps2zim-0.2.0.tar.gz
  • Upload date:
  • Size: 972.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.2.0.tar.gz
Algorithm Hash digest
SHA256 4dc7b219bb82e13bbeeca07c045c6d0cf51c4e21e582157dfd384f75c39124b7
MD5 4c7323ed8ad44c994a4ad00c214f034f
BLAKE2b-256 c53bd2f7d7f1007cc4f694454ec6341091ad31aff64a792636131e6504cc8180

See more details on using hashes here.

Provenance

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

File metadata

  • Download URL: maps2zim-0.2.0-py3-none-any.whl
  • Upload date:
  • Size: 977.0 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.0-py3-none-any.whl
Algorithm Hash digest
SHA256 d1f4d7644fcae4ac05e2c21d838443525ee0b4c2f33115d2561c9bf1d81f0b2f
MD5 5962b0960eebc2c0b31aa58207058fee
BLAKE2b-256 83cfa12e4cc60289453b0cfe3b2371f3c41615577f304030f0f2657f6c53f88b

See more details on using hashes here.

Provenance

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