Socket
Socket
Sign inDemoInstall

epsg-index

Package Overview
Dependencies
0
Maintainers
1
Versions
35
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    epsg-index

A machine-readable index of all EPSG coordinate systems.


Version published
Weekly downloads
2.7K
increased by0.78%
Maintainers
1
Install size
15.4 MB
Created
Weekly downloads
 

Readme

Source

epsg-index

A machine-readable index of all EPSG coordinate systems. Similar to epsg and node-proj4js-defs, but kept up to date (so far). Like python-epsg, but in JavaScript/JSON.

npm version ISC-licensed minimum Node.js version support me via GitHub Sponsors chat with me on Twitter

Installing

npm install epsg-index

Usage

// use import assertions once they're supported by Node.js & ESLint
// https://github.com/tc39/proposal-import-assertions
import {createRequire} from 'module'
const require = createRequire(import.meta.url)

const epsg4326 = require('epsg-index/s/4326.json')

console.log(epsg4326)
{
	code: '4326',
	kind: 'CRS-GEOGCRS',
	name: 'WGS 84',
	wkt: 'GEOGCS["WGS 84",DATUM["WGS_1984",SPHEROID["WGS 84",6378137,298.257223563,AUTHORITY["EPSG","7030"]],AUTHORITY["EPSG","6326"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4326"]]',
	proj4: '+proj=longlat +datum=WGS84 +no_defs',
	bbox: [90, -180, -90, 180],
	unit: 'degree (supplier to define representation)',
	area: 'World.',
	accuracy: null
}

You can also load all coordinate systems (5mb of data):

const all = require('epsg-index/all.json')

console.log(all['4326'])
  • transform-coordinates – Transform coordinates from one coordinate system to another. Built on top of epsg-index.
  • python-epsg – A Python API to the EPSG Geodetic Parameter Dataset.

Contributing

If you have a question or have difficulties using epsg-index, please double-check your code and setup first. If you think you have found a bug or want to propose a feature, refer to the issues page.

Keywords

FAQs

Last updated on 07 Nov 2023

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc