Skip to content
Kohei Otsuka edited this page Jul 24, 2026 · 1 revision

FAQ

Frequently asked questions about MaplatTin.

Table of Contents


Can I use MaplatTin commercially?

Yes. MaplatTin is licensed under Apache License 2.0, which permits commercial use, modification, and redistribution. The patent grant (Patent No. 6684776) is included. See the README License section for details.

What is the difference between MaplatTin and MaplatCore?

MaplatCore (@maplat/core) is the browser rendering library of the Maplat viewer. It uses MaplatTin internally for the live coordinate transform, but wraps it with OpenLayers rendering, the app-data protocol, POI/layer management, GPS, and events.

MaplatTin (@maplat/tin) is the standalone coordinate-transform library only — no rendering, no I/O. Use MaplatTin when you need pure transform math (e.g. a Node.js preprocessing pipeline). Use MaplatCore when you are building a viewer.

What license were past versions under?

Versions before 0.14.2 were published under the "Maplat Limited License 1.1" (a restricted license). Starting from 0.14.2, MaplatTin has reverted to Apache License 2.0. Note that npmjs.com still shows the restricted license notation for past versions — this is an npm display limitation, not a current licensing issue. See known-discrepancies for details.

Does MaplatTin require OpenLayers?

No. MaplatTin has no OpenLayers dependency. It is pure coordinate math.

This is intentional: MaplatTin can run in a pure Node.js context for offline preprocessing (e.g. as part of a MaplatTransform pipeline), without pulling in the browser-only OpenLayers bundle.

Can MaplatTin run on Node.js (server-side)?

Yes. MaplatTin is designed to be isomorphic: the same package runs in the browser (via UMD or ESM CDN) and in Node.js (via import).

Typical server-side use is batch preprocessing — read a GCP set, solve the TIN, and write the compiled state for later use by the viewer:

import Tin from '@maplat/tin';
import { readFileSync, writeFileSync } from 'node:fs';

const tin = new Tin({ wh: [2000, 1500] });
tin.setPoints(JSON.parse(readFileSync('gcps.json')));
tin.updateTin();
writeFileSync('compiled.json', JSON.stringify(tin.getCompiled()));

What happens when topology is broken?

When the control points cannot produce a topology-preserving TIN (typically because they create folding triangles), MaplatTin's behavior depends on strictMode:

  • "strict"updateTin() throws an error.
  • "auto" (default) — falls back to loose mode; strict_status becomes STATUS_LOOSE.
  • "loose" — always allows; strict_status is STATUS_LOOSE.

In STATUS_LOOSE, forward transforms still work, but inverse transforms may not be unique. See Concepts § Strict and loose modes for details.


日本語版はこちら / Read this page in Japanese

See Also

MaplatTin

Language / 言語

Pages / ページ

English

日本語

External / 外部

Clone this wiki locally