JSPM

proj4js-definitions

0.1.0
  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 32432
  • Score
    100M100P100Q151523F
  • License CC0-1.0

Almost All the Projection Definitions for Proj4js

Package Exports

  • proj4js-definitions

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (proj4js-definitions) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

proj4js-definitions

Almost All the Projection Definitions for Proj4js

simple approach

acknowledgements

The data source crs-csv is actually created by scraping a locally running instance of epsg.io

install

npm install proj4js-definitions

usage in code

const defs = require("proj4js-definitions");

defs are an array

[
  [
    'EPSG:2000',
    '+proj=tmerc +lat_0=0 +lon_0=-62 +k=0.9995000000000001 +x_0=400000 +y_0=0 +ellps=clrk80 +units=m +no_defs'
  ],
  [
    'EPSG:2001',
    '+proj=tmerc +lat_0=0 +lon_0=-62 +k=0.9995000000000001 +x_0=400000 +y_0=0 +ellps=clrk80 +towgs84=-255,-15,71,0,0,0,0 +units=m +no_defs'
  ],
  [
    'EPSG:2002',
    '+proj=tmerc +lat_0=0 +lon_0=-62 +k=0.9995000000000001 +x_0=400000 +y_0=0 +ellps=clrk80 +towgs84=725,685,536,0,0,0,0 +units=m +no_defs'
  ],
  [
    'EPSG:2003',
    '+proj=tmerc +lat_0=0 +lon_0=-62 +k=0.9995000000000001 +x_0=400000 +y_0=0 +ellps=clrk80 +towgs84=72,213.7,93,0,0,0,0 +units=m +no_defs'
  ],
  ... 4700+ more items
]

After loading the defs update your proj4 projector with

const proj4 = require("proj4");

proj4.defs(defs);