# get-epsg-code

> Gets EPSG Code for Various Inputs (incl. OGC WKT, ESRI WKT, GML, Mapfile, PROJ String, Proj4js String, XML)

Latest version **1.2.0** (published 2023-11-07) · CC0-1.0 license · 0 weekly downloads

## Install

```sh
npm install get-epsg-code
pnpm add get-epsg-code
yarn add get-epsg-code
bun add get-epsg-code
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.2.0 |
| Published | 2023-11-07 |
| First published | 2020-02-14 |
| Weekly downloads | 0 |
| License | CC0-1.0 |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 6 |
| Unpacked size | 1.6 MB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 9 |
| Author | Daniel J. Dufour |
| Maintainers | danieljdufour |
| Keywords | epsg, gis, map, ogc, wkt, esri, proj, proj4, proj4js, crs, geodesy, projcrs, geogcrs, geocrs |

## Links

- npm: https://www.npmjs.com/package/get-epsg-code
- Repository: https://github.com/danieljdufour/get-epsg-code
- Homepage: https://github.com/danieljdufour/get-epsg-code#readme
- Issues: https://github.com/danieljdufour/get-epsg-code/issues
- npm.io page: https://npm.io/package/get-epsg-code

## Dependencies (6)

- [b64ab](https://npm.io/package/b64ab.md) ^0.0.1
- [is-wkt](https://npm.io/package/is-wkt.md) ^0.2.0
- [wkt-crs](https://npm.io/package/wkt-crs.md) ^0.2.0
- [utm-utils](https://npm.io/package/utm-utils.md) ^0.6.1
- [xml-utils](https://npm.io/package/xml-utils.md) ^1.7.0
- [wkt-parser](https://npm.io/package/wkt-parser.md) ^1.3.3

## Recent versions

- 1.2.0 (latest) — 2023-11-07
- 1.0.0-1 (next) — 2023-07-02
- 1.1.0 — 2023-07-05
- 1.0.1 — 2023-07-04
- 1.0.0 — 2023-07-02
- 1.0.0-0 — 2023-07-02
- 0.1.0 — 2021-12-11
- 0.0.7 — 2021-09-01
- 0.0.6 — 2021-09-01
- 0.0.5 — 2020-09-07
- 0.0.4 — 2020-03-21
- 0.0.2 — 2020-02-15
- 0.0.0 — 2020-02-14

## README

# get-epsg-code: *beta*
Gets the EPSG Code for Nearly All Coordinate Reference System Formats (including OGC WKT, WKT 2, ESRI WKT, GeoServer Config, Mapfile, Mapnik Config, PostGIS Statement, PROJJSON, PROJ String, and Proj4JS String)
s
# usage
```javascript
const getEPSGCode = require("get-epsg-code");

const proj4string = "+proj=merc +a=6378137 +b=6378137 +lat_ts=0.0 +lon_0=0.0 +x_0=0.0 +y_0=0 +k=1.0 +units=m +nadgrids=@null +wktext  +no_defs";

const epsgCode = getEPSGCode(proj4string);
// 3857
```

# purpose
Get the EPSG code for input without the need for a remote server

# algorithm
Take a CSV of Coordinate Reference System formats, hash the columns and stores the result in a binary file.

# limitations
This package goes only one way. It only gets EPSG codes for a given input. It cannot provide coordinate information for an EPSG code.

# advanced usage
For advanced usage, see [ADVANCED_USAGE.md](https://github.com/DanielJDufour/get-epsg-code/blob/master/ADVANCED_USAGE.md)

# contact
Post an issue at https://github.com/danieljdufour/get-epsg-code/issues or email the package author at daniel.j.dufour@gmail.com

---
_Source: https://npm.io/package/get-epsg-code · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
