#browser #adiff

app osmcha-cli

View OpenStreetMap augmented diff files on a map in your browser

2 stable releases

new 1.1.0 Mar 30, 2025
1.0.1 Mar 28, 2025

#283 in #browser

Download history 56/week @ 2025-03-23

56 downloads per month

ISC license

4.5MB
321 lines

osmcha-cli

This is a command line tool for visualizing changes to OpenStreetMap (loaded from an augmented diff file) on a map in your browser.

It is similar to the osmcha.org interface in that both can display changes made to OSM on a map. However, osmcha-cli is more flexible in that it can load and display any augmented diff file, regardless of what that file represents (it could represent a single changeset, or a collection of changes made by many users, or even a change you're preparing in JOSM but haven't uploaded yet).

Installation

This tool is written in Rust and is published to crates.io. If you have a Rust toolchain installed, you can download and build it by running:

$ cargo install osmcha-cli

You can also clone this repository and run cargo install --path . in it.

Usage

Let's first get some augmented diff data to visualize. In this example I'll use overpass-cli to create a diff file representing all changes made to roads in Kauai, HI in 2024.

$ overpass --adiff 2024-01-01T00:00:00Z 2025-01-01T00:00:00Z \
           --bbox -159.83 21.84 -159.24 22.24 \
           --out geom \
           'way[highway]' \
  > kauai.adiff

From there you can run the osmcha command line program to view the result.

$ osmcha kauai.adiff
listening on http://localhost:48756

Your browser should open automatically and display something like this:

Screenshot of the osmcha-cli browser interface showing roads in Kauai

Clicking on individual features will open a popup that shows details about what was changed.

Implementation

osmcha-cli uses components from OSMCha:

You can use these components in your own projects if you want to visualize changes on a map in the style of OSMCha.

License

This program's source code is available under the ISC License. See the LICENSE file for details.

Dependencies

~25–56MB
~1M SLoC