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

@maplat/transform

v0.5.3

Published

A JavaScript library that performs coordinate transformation between two plane coordinate systems using transformation definitions generated by Maplat.

Downloads

1,829

Readme

About MaplatTransform

MaplatTransform is a JavaScript library that performs coordinate transformation between two plane coordinate systems using transformation definitions generated by Maplat. It is the runtime transform engine of the Maplat ecosystem: the companion @maplat/tin package generates the TIN definitions, and MaplatTransform executes them at runtime.

MaplatTransform is open-source under the Apache License 2.0 (from version 0.5.3).

Read this document in Japanese / 日本語で読む

Key Features

  • Coordinate transformation between two plane coordinate systems using Maplat-generated TIN definitions (forward and backward, topology-preserving)
  • V2/V3 compiled format support (V3 adds N-boundary vertices for higher accuracy)
  • Multiple coordinate system support: standard orthogonal, Y-axis inverted, bird's-eye view distorted
  • Sub-map selection, viewport transformation, and cross-map viewport sync (Processings 2–4)
  • State save/restore for transformation states

Quick Start

Release-dependent information (ADR-0012). The version 0.5.3 below is the current release; update it on each new release.

Install

# pnpm (recommended)
pnpm add @maplat/transform

# npm
npm install @maplat/transform

Minimal usage

import { Transform } from '@maplat/transform';

// Load a compiled transformation definition generated by Maplat
const transform = new Transform();
transform.setCompiled(compiledData);

// Forward transformation (source -> target coordinate system)
const transformed = transform.transform([100, 100], false);

// Backward transformation (target -> source coordinate system)
const restored = transform.transform(transformed, true);

The library may throw errors in strict mode, when a backward transformation is attempted while not allowed, or when the data structure is invalid. In those cases the transformation definition itself needs to be fixed — use @maplat/tin to edit the definition.

CDN (jsDelivr)

<script src="https://cdn.jsdelivr.net/npm/@maplat/[email protected]/dist/maplat_transform.umd.js"></script>

MapTransform usage (Processings 2–4)

For sub-map selection, viewport transformation, and cross-map viewport synchronization, see the Wiki Tutorials.

API reference

Development

pnpm test

Prerequisites

Derived from the engines field in package.json (ADR-0012: release-dependent).

  • Node.js: >=20 or later
  • pnpm: >=9 or later (recommended; npm also works)

Ecosystem

MaplatTransform is part of the Maplat ecosystem by Code for History. See the full ecosystem map (8 repositories + product/corporate sites):

📖 Ecosystem Map(the diagram is currently kept in a private planning repository; the Sister repositories table below is the public substitute)

Sister repositories

| Repository | License | npm | Role | |---|---|---|---| | Maplat | Apache 2.0 | @maplat/ui | Main viewer | | MaplatCore | Apache 2.0 | @maplat/core | Core library | | MaplatTin | Apache 2.0 | @maplat/tin | TIN conversion | | MaplatTransform | Apache 2.0 | @maplat/transform | Coordinate transform | | MaplatEditor | Apache 2.0 | — | Data authoring tool (desktop) |

MaplatEditor is the data authoring tool used to create the maps and POIs that the viewers above render. The Maplat ecosystem is end-to-end: author with MaplatEditor, serve with any of the viewer libraries.

Note: MaplatTransform executes coordinate transformations only. To create or edit transformation definitions, use @maplat/tin.

Links

| Audience | Link | Purpose | |---|---|---| | Project info / features / cases | https://www.maplat.jp/en/ | Product site | | Sponsor / business inquiry | https://www.nayuta-inc.co.jp/en/ | Corporate site (Nayuta, Inc.) |

ADR-0013: Apache-licensed repositories (this one) link to both sites. MIT-licensed sister repos (Weiwudi / Quyuan / Chuci) carry no Nayuta link.

License

Apache License 2.0 — see LICENSE.

Copyright 2019-2026 Kohei Otsuka, Code for History / Nayuta, Inc.

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

    http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.

Patent notice: The Maplat coordinate-transform technology is patented in Japan (Patent No. 6684776).

Past versions: Versions before 0.5.3 were distributed under the Maplat Limited License 1.1. The license restoration to Apache 2.0 takes effect from version 0.5.3 onward. Earlier versions available on npmjs.com remain under their original limited-license terms.

Contributors

  • Kohei Otsuka
  • Code for History

We welcome your contributions! Feel free to submit issues and pull requests.