Skip to content

Instantly share code, notes, and snippets.

@praszuk
praszuk / boundaries_splitter.md
Last active September 6, 2025 21:48
Split (Multi)Polygons to unique LineStrings.

Boundaries splitter

The tool can be used to transform a GeoJSON file with Polygons and MultiPolygons into a GeoJSON file with LineStrings, which makes it easier to replace geometries in the JOSM editor.

How it works

The script splits boundary lines at their intersections.
E.g. 3 borders areas (polygons), each one has a line which may duplicate edges of another like for green & red and red & blue:

@praszuk
praszuk / osm-website-quick-actions.user.js
Last active June 29, 2025 15:31
Add OSM quick actions (Achavi, OSMCha) below change set id.
// ==UserScript==
// @name OSM-website actions
// @namespace http://tampermonkey.net/
// @version 1.1.1
// @description Add few quick actions below changeset id
// @author praszuk
// @match https://www.openstreetmap.org/changeset*
// @icon https://www.openstreetmap.org/favicon.ico
// @grant none
// @run-at document-idle