npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@kiwirm/panmap

v0.1.1

Published

Read OCAD, OMap/XMap, and GitMap orienteering-map files into a shared PanMap model, and export to GeoJSON, SVG, or GitMap.

Readme

panmap

Read OCAD/OCD and OpenOrienteering Mapper OMap/XMap map files into a shared PanMap model, then export that model to GeoJSON, SVG, GitMap, or visual map diffs.

Supported inputs: OCAD 10, 11, 12, 2018 and OMap/XMap XML v9.

Example Map Output 1 Example Map Output 2 Example Map Output 3

Install

npm install panmap

API

import {
  read, write, convert, exportMap,
  ocad, omap, gitmap,
  diff, diffMapsToSvg,
  mapToGeoJson, mapToSvg, getMapSvgRenderSupport,
} from 'panmap'

Top-level:

  • read(input, options?) — parse an OCAD, OMap/XMap, or GitMap package into a PanMap. input is a file path, Buffer, or XML string.
  • write(map, path, options?) — write a PanMap to a native format (ocd / omap / xmap / gitmap — chosen by extension or options.format).
  • convert(input, path, options?) — read + write in one call (lossless conversion between native formats).
  • exportMap(map, path, options?) — export to a lossy target (svg, geojson).
  • diff(before, after, options?) — compare two maps; returns added, removed, modified, and (optionally) unchanged geometry.
  • mapToSvg(map, options?) / mapToGeoJson(map, options?) — direct exporters.
  • diffMapsToSvg(before, after, options?) — compare two maps and render the diff as SVG.
  • getMapSvgRenderSupport(map) — reports whether every object can be rendered directly from PanMap render layers.

Per-format namespaces expose the raw readers/writers for callers that need to work below the PanMap model:

  • ocad.readRaw(input, options?) → low-level OcadFile
  • ocad.toMap(ocadFile)PanMap
  • ocad.read(input, options?) → shortcut for toMap(readRaw(...))
  • ocad.write(map, path) → write OCAD binary
  • omap.readRaw(input) / omap.toMap(...) / omap.read(...) / omap.write(...)
  • gitmap.read(directory) / gitmap.write(map, directory)

GitMap

GitMap is the revision-control-friendly package format used to store maps in Git. Version 1 writes a small directory containing stable JSON metadata and one objects.ndjson file with one object per line, so git diff on map edits produces a minimal, human-readable diff. See gitmap/README.md for the spec, plus the companion specs distributions.md and extensions.md.

SVG rendering

SVG export is handled by a shared render-layer renderer for both OCAD/OCD and OMap/XMap inputs. Supported layer types: fills, strokes, hatches, structure and point patterns, point-symbol elements, line symbols, double lines, border symbols, combined symbols, text, and diff overlays.

CLI

panmap info map.ocd
panmap export map.ocd map.svg
panmap export map.ocd map.svg --white-background
panmap export map.ocd map.geojson
panmap convert map.ocd map.omap
panmap convert map.ocd map.gitmap
panmap export map.gitmap map.svg

Missing / partial features

  • Hatch fills are emulated with semi-transparent fills when exporting to Mapbox styles.
  • Text kerning and complex text layouts are best-effort.
  • OCAD binary encoding for from-scratch (non-OCAD-sourced) maps is best-effort; OCAD-sourced maps round-trip via a mix of byte preservation and field-level re-encoding.

Open an issue if you hit a shape that doesn't round-trip cleanly.

Development

npm install
npm test           # tsc + eslint + ava
npm run build      # emit dist/ (JS + .d.ts)

License

AGPL-3.0.