Skip to main content

Tool for handling (negative) IDs and merging different OSM maps (e.g. Lanelet2 maps). Very helpful if you have modeled several maps separately and now want to merge them into a single map.

Project description

OSM Map Merger

IMPORTANT NOTE This repository is part of the Behavior-Semantic Scenery Description (BSSD) framework. Check out our BSSD documentation and overview repository in your git of choice: GitLab GitHub

This tool can be used to handle one or more maps in OSM-format such as Lanelet2 maps including the BSSD extension.

Features:

  • Assign positive IDs to all elements and add a "version" attribute if missing. This is necessary after modification or creation of OSM-maps (e.g. with JOSM) without synchronizing with the OSM database.
  • Remap single negative IDs without changing the positive IDs.
  • Merge multiple OSM input files into a single OSM output file. This works also for a mixture of positive and negative IDs.
  • Elements with "action"="delete" will be ignored.

Use the --help command for more information about the usage.

Requirements

  • Python 3.8 or higher
  • osmium >=3.2.0
  • lxml,
  • beautifulsoup4,
  • click

Installation

Using pip

pip install osm-map-merger

This will install the latest version of the OSM Map Merger available in PyPI to your environment.

Manual Installation

Clone the source code to a directory of your choice (path/to/osm-map-merger-src/).

If you are using virtual environments, make sure to activate the correct environment to install the library into e.g:

source /<path-to-my-project>/.venv/bin/activate

Install the library:

pip install -e path/to/osm-map-merger-src/

Usage

To see a list of available commands use:

osm-map-merger --help

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

osm_map_merger-2025.1.tar.gz (7.8 kB view details)

Uploaded Source

Built Distribution

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

osm_map_merger-2025.1-py3-none-any.whl (7.3 kB view details)

Uploaded Python 3

File details

Details for the file osm_map_merger-2025.1.tar.gz.

File metadata

  • Download URL: osm_map_merger-2025.1.tar.gz
  • Upload date:
  • Size: 7.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.0.1 CPython/3.8.10

File hashes

Hashes for osm_map_merger-2025.1.tar.gz
Algorithm Hash digest
SHA256 c98ce5ec6e8ec022301e18b62c0561fcf8282ea2e424ba9b8ddbb3a9ea8ddcdb
MD5 1ff945324c6c9c43664253aeb18a4f63
BLAKE2b-256 dd12e5165a250e06ad66f0190901e3d4ed3be0e0635ead1b3891e7d6f520aa6c

See more details on using hashes here.

File details

Details for the file osm_map_merger-2025.1-py3-none-any.whl.

File metadata

File hashes

Hashes for osm_map_merger-2025.1-py3-none-any.whl
Algorithm Hash digest
SHA256 6fcd6a4d803e768840831e55a5634af7ce3e3e8c170554a35f4f4f58b906f261
MD5 a43bcc1d3cbe5b80b9f8f03a6fead9a7
BLAKE2b-256 1375ca10fa8393d06428bdb9f3c1439fce9cf2fe7eca23221bcb77e27e4f0c0b

See more details on using hashes here.

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