A machine-readable index of EPSG coordinate systems.
Similar to epsg and
node-proj4js-defs, but kept
up to date. Like python-epsg, but
in JavaScript/JSON.
npm install @zwishing/epsg-indexLoad a single PROJJSON definition by EPSG code:
import {createRequire} from 'node:module'
const require = createRequire(import.meta.url)
const epsg4326Projjson = require('@zwishing/epsg-index/s/4326.json')
console.log(epsg4326Projjson.type)Load the lightweight index of all coordinate systems:
import {createRequire} from 'node:module'
const require = createRequire(import.meta.url)
const all = require('@zwishing/epsg-index/all.json')
console.log(all['4326'])In all.json, projjson is a path to the per-code PROJJSON file. The full
PROJJSON payload can be loaded only when needed:
import {createRequire} from 'node:module'
const require = createRequire(import.meta.url)
const all = require('@zwishing/epsg-index/all.json')
const epsg4326Projjson = require('@zwishing/epsg-index/' + all['4326'].projjson)
console.log(epsg4326Projjson.type)CommonJS usage:
const all = require('@zwishing/epsg-index/all.json')
const epsg4326Projjson = require('@zwishing/epsg-index/' + all['4326'].projjson)
console.log(epsg4326Projjson)all.jsoncontains the searchable index for all EPSG records.all.json[code].projjsonpoints tos/<code>.jsonwhen PROJJSON is available.s/<code>.jsoncontains only the PROJJSON object for one code.
transform-coordinatestransforms coordinates from one coordinate system to another. Built on top ofepsg-index.python-epsgis a Python API to the EPSG Geodetic Parameter Dataset.
If you have a question or have difficulties using epsg-index, please
double-check your code and setup first. If you found a bug or want to propose a
feature, refer to the issues page.