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

@orbat-mapper/control-measures

v0.2.0-alpha.15

Published

Library for drawing tactical graphics and control measures according to MIL-STD-2525 and APP-6 standards.

Readme

@orbat-mapper/control-measures

Generates tactical control measures as GeoJSON, following MIL-STD-2525 and APP-6 conventions.

The output is plain GeoJSON, so it drops into Leaflet, MapLibre, OpenLayers, or any other consumer without a mapping dependency of its own. Everything goes through one entry point, renderControlMeasure(cm, options), backed by a metadata catalog for discovering the available measures and their options, plus an optional validationMode per render for catching bad input.

Installation

# npm
npm install @orbat-mapper/control-measures

# pnpm
pnpm add @orbat-mapper/control-measures

Quick Start

Describe a control measure as a ControlMeasure object — kind, controlPoints, and optional options — then render it:

import { renderControlMeasure, type ControlMeasure } from "@orbat-mapper/control-measures";

const mainAttack: ControlMeasure<"main-attack"> = {
  id: "alpha",
  kind: "main-attack",
  controlPoints: [
    [10, 10], // tip
    [5, 5], // spine
    [0, 0], // neck
    [2, 6], // width control
  ],
};

const render = renderControlMeasure(mainAttack, { validationMode: "warn" });
// render is a ControlMeasureRender: a GeoJSON FeatureCollection whose features
// carry stable ids (`${cm.id}:${part}:${index}`) and resolved style hints.

renderControlMeasure returns a ControlMeasureRender — a GeoJSON FeatureCollection of FeaturePartProps-typed features.

Discovering measures and options

Skip the per-measure imports and query the catalog instead:

import {
  CONTROL_MEASURE_IDS,
  listControlMeasureMetadata,
  getControlMeasureMetadata,
  getDefaultOptions,
} from "@orbat-mapper/control-measures";

CONTROL_MEASURE_IDS; // readonly list of every control-measure id
listControlMeasureMetadata(); // metadata (geometry, required points, params, symbology)
getControlMeasureMetadata("block"); // metadata for one measure
getDefaultOptions("block"); // default options object for one measure

Each measure also exports its options type and defaults constant, e.g. BlockOptions / DEFAULT_BLOCK_OPTIONS, MainAttackOptions / DEFAULT_MAIN_ATTACK_OPTIONS.

Validation behavior

renderControlMeasure accepts a RenderOptions object whose validationMode controls how invalid coordinate input is handled:

  • validationMode: "silent" | "warn" | "throw"

When omitted, validation defaults to silent mode — invalid input yields an empty render. "throw" is useful for strict integrations and tests.

Supported control measures

Grouped by APP-6/MIL-STD-2525 entity type, with each measure's 2525E symbol code.

Command and Control Lines

| Preview | kind | Measure | 2525E Value | | --- | --- | --- | --- | | | boundary | Boundary | 110100 |

Maneuver Lines

| Preview | kind | Measure | 2525E Value | | --- | --- | --- | --- | | | flot | Forward line of own troops (FLOT) | 140100 | | | final-protective-fire-left | Final Protective Fire (Left) | 140501 | | | final-protective-fire-right | Final Protective Fire (Right) | 140502 | | | principal-direction-of-fire | Principal Direction of Fire | 140503 | | | ambush | Ambush | 141700 |

Maneuver Areas

| Preview | kind | Measure | 2525E Value | | --- | --- | --- | --- | | | fortified-area | Fortified Area | 151000 | | | battle-position | Battle Position | 151200 | | | strong-point | Strong Point | 151203 | | | airborne-attack | Airborne Attack | 151401 | | | attack-helicopter | Attack Helicopter | 151402 | | | main-attack | Main Attack | 151403 | | | supporting-attack | Supporting Attack | 151404 | | | encirclement | Encirclement | 151800 | | | attack-by-fire | Attack by Fire | 152000 | | | support-by-fire | Support By Fire | 152100 | | | search-area | Search Area | 152200 |

Protection Areas

| Preview | kind | Measure | 2525E Value | | --- | --- | --- | --- | | | block | Block | 270501 | | | disrupt | Disrupt | 270502 | | | fix | Fix | 270503 | | | turn | Turn | 270504 | | | obstacle-bypass-easy | Obstacle Bypass Easy | 270601 | | | obstacle-bypass-difficult | Obstacle Bypass Difficult | 270602 | | | obstacle-bypass-impossible | Obstacle Bypass Impossible | 270603 |

Protection Lines

| Preview | kind | Measure | 2525E Value | | --- | --- | --- | --- | | | antitank-ditch-under-construction | Ditch - Under Construction | 290201 | | | antitank-ditch-completed | Ditch - Completed | 290202 | | | antitank-wall | Antitank Wall | 290204 | | | fortified-line | Fortified Line | 290900 |

Mission Tasks

| Preview | kind | Measure | 2525E Value | | --- | --- | --- | --- | | | block-mission-task | Block | 340100 | | | breach | Breach | 340200 | | | bypass | Bypass | 340300 | | | canalize | Canalize | 340400 | | | clear | Clear | 340500 | | | delay | Delay | 340800 | | | isolate | Isolate | 341500 |

Generic Graphics

| Preview | kind | Measure | 2525E Value | | --- | --- | --- | --- | | | block-arrow | Block Arrow | 990001 | | | classic-arrow | Classic Arrow | 990002 | | | line | Line | 990101 | | | polygon | Polygon | 990102 | | | rectangle | Rectangle | 990103 | | | circle | Circle | 990104 |

This table and the preview SVGs are generated; run pnpm --filter @orbat-mapper/control-measures generate-docs after adding or changing a measure to refresh both.

License

MIT