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

@peterbak6/geoconverter

v1.0.2

Published

A numerically stable, auditable coordinate conversion library optimized for high-throughput workloads.

Downloads

180

Readme

GeoConverter

Fast, auditable coordinate conversion for:

  • ITM (EPSG:2039) ↔ WGS84 (EPSG:4326)
  • Web Mercator (EPSG:3857) ↔ WGS84 (EPSG:4326)

Designed for performance, transparency, and reproducibility.

Demo (interactive map + benchmarks)


License: MIT TypeScript Math audited


Why GeoConverter?

Most projection libraries:

  • are black boxes
  • optimized for flexibility, not speed
  • hard to audit mathematically

GeoConverter is:

  • Fast --- optimized for large coordinate batches
  • 📐 Transparent --- math matches EPSG definitions step-by-step
  • 🧪 Testable --- roundtrip + proj4 comparisons included
  • 🧭 Deterministic --- no hidden state

Built for:

  • GIS pipelines
  • simulation
  • mapping tools
  • mobility & geo analytics
  • visualization engines

Install

npm install @peterbak6/geoconverter

Usage

ITM (EPSG:2039)

import { toItm, fromItm } from "@peterbak6/geoconverter";

const [E, N] = toItm(35.503194, 32.547015);
const [lon, lat] = fromItm(E, N);

High-performance variant (no tuple allocation)

import { toItmOut } from "@peterbak6/geoconverter";

const out = new Float64Array(2);
toItmOut(lon, lat, 0, out, 0);

const E = out[0];
const N = out[1];

Web Mercator

import { toWebMercator, fromWebMercator } from "@peterbak6/geoconverter";

const [x, y] = toWebMercator(35.21, 31.77);
const [lon, lat] = fromWebMercator(x, y);

Accuracy

Validated against Proj4 using the official EPSG:2039 definition.

Metrics:

  • forward delta vs proj4
  • inverse delta vs proj4
  • roundtrip drift

Example test points:

[34.7893, 32.0732]
[35.2134, 31.7683]
[34.9876, 32.1234]

Roundtrip drift is typically near floating-point precision.


Performance

Benchmarked for high-volume coordinate conversion.

Typical results (machine dependent):

WebMercator 1M: ~70 ms
ITM 1M:        ~380 ms
ITM (no tuple): ~320 ms

Focus:

  • minimal allocations
  • predictable memory
  • vector-friendly math

Demo

Interactive site includes:

  • live converter
  • map hover showing Lon/Lat, WM, ITM
  • accuracy comparison vs proj4
  • performance microbenchmarks

→ https://peterbak6.github.io/geoconverter


Math transparency

Implements full pipeline:

  • geodetic ↔ ECEF
  • Helmert transform
  • Transverse Mercator series
  • EPSG parameters
  • GRS80 ellipsoid

No hidden simplifications.


API

ITM

toItm(lon, lat)
fromItm(E, N)
toItmOut(lon, lat, flags, outArray, offset)

WebMercator

toWebMercator(lon, lat)
fromWebMercator(x, y)

All angles in degrees.
All projected units in meters.


Repository structure

packages/geoconverter
apps/demo
  • npm library
  • demo site (GitHub Pages)

Development

pnpm install
pnpm -C packages/geoconverter build
pnpm -F demo dev

License

MIT --- free for commercial and research use.