WKT Viewer

May 7, 2026 ยท View on GitHub

CI

WKT Viewer

Visualize and navigate files containing WKT (Well Known Text) geometries in Visual Studio Code.

Preview Image

Features

  • Instantly visualizes WKT geometries in the current text editor.
  • Highlights the current geometry as you navigate through text.
  • Selects the corresponding text when you click a geometry in the viewer.
  • Supports optional [awkt ...] metadata annotations for WKT embedded in logs.

Annotated WKT Metadata

WKT Viewer can attach lightweight metadata to geometries found in generic log files:

[awkt id=stroke-01234 tag=sweep-0007 label=01234] LINESTRING (0 0, 10 0)

The annotation applies to the first WKT geometry after the [awkt ...] block, up until the next annotation block. Unannotated WKT still renders normally.

Supported keys are id, tag, and label. Unknown key=value fields are preserved for details, but do not affect rendering.

Quick Start

  1. Install WKT Viewer from the VS Code Marketplace.
  2. Open a file containing WKT geometries.
  3. Run Start WKT Viewer from the command palette.

Extension Settings

  • wktViewer.maxGeometries: Maximum number of WKT geometries to parse and show from the active document. Defaults to 500.

Development

Requirements: Node.js 20 and npm.

npm ci
npm run build
npm test

Running the Extension

  • F5: Launch the extension in an Extension Development Host.
  • Ctrl+Shift+B -> Start Dev Env: Start TypeScript watch mode and the Vite dev server.

Debugging

  • Extension backend: set breakpoints and press F5.
  • Webview frontend: run Developer: Open Webview Developer Tools from the command palette.

Contributing

We use Release Please, so commit messages should follow Conventional Commits. Release Please reads commits on main, so squash commit titles must follow this format too.

Use these types:

  • feat: user-visible features. Shown in the changelog and bumps the minor version.
  • fix: user-visible bug fixes. Shown in the changelog and bumps the patch version.
  • deps: dependency updates worth mentioning. Shown in the changelog.
  • docs:, test:, refactor:, build:, chore: internal changes. Hidden from the changelog.

Use build: for build, CI, packaging, and workflow changes. Do not use ci: in this repository.

For breaking changes, use ! after the type or scope, or add a BREAKING CHANGE: footer.

Before publishing, verify a VSIX:

npm run package

Release and Publishing

Squash merge the PR generated by release-please. It updates CHANGELOG.md, updates package.json, and creates a GitHub release.

Publishing to the VS Code Marketplace is automated from .github/workflows/release-please.yml. When release-please creates a release, it calls .github/workflows/publish-marketplace.yml.

Required repository secret:

  • VSCE_PAT: Personal Access Token for the halls-byra publisher in the VS Code Marketplace.

Release flow:

  1. Merge the release-please PR.
  2. release-please creates a GitHub release.
  3. Publish Marketplace checks out the release tag, runs build, tests, and package, then publishes the generated VSIX with VSCE_PAT.

To retry a failed publish, run Publish Marketplace manually from GitHub Actions and enter the release tag as ref.