# utm-utils

> Super Light-Weight Utility Functions for Working with Universal Transverse Mercator

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

## Install

```sh
npm install utm-utils
pnpm add utm-utils
yarn add utm-utils
bun add utm-utils
```

## Health

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

Positive: no vulnerabilities.

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

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.6.1 |
| Published | 2023-07-04 |
| First published | 2020-03-19 |
| Weekly downloads | 0 |
| License | CC0-1.0 |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Unpacked size | 13.9 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 4 |
| Author | Daniel J. Dufour |
| Maintainers | danieljdufour |
| Keywords | coordinate, geodesy, geospatial, mercator, proj, projection, utm |

## Links

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

## Alternatives

- [jsforce](https://npm.io/package/jsforce.md) — 851.2K weekly downloads
- [react-native-qrcode-svg](https://npm.io/package/react-native-qrcode-svg.md) — 693.5K weekly downloads
- [@salesforce/plugin-data](https://npm.io/package/@salesforce/plugin-data.md) — 394.9K weekly downloads
- [@backstage/plugin-search-common](https://npm.io/package/@backstage/plugin-search-common.md) — 308.5K weekly downloads
- [@chain-registry/types](https://npm.io/package/@chain-registry/types.md) — 38.4K weekly downloads

## Recent versions

- 0.6.1 (latest) — 2023-07-04
- 0.6.0 — 2023-06-30
- 0.5.0 — 2023-06-24
- 0.4.0 — 2023-05-13
- 0.3.0 — 2023-05-13
- 0.2.0 — 2023-02-06
- 0.1.0 — 2020-07-18
- 0.0.1 — 2020-03-19
- 0.0.0 — 2020-03-19

## README

# utm-utils
Super Light-Weight Utility Functions for Working with [Universal Transverse Mercator](https://en.wikipedia.org/wiki/Universal_Transverse_Mercator_coordinate_system)

# Usage
## Check if EPSG Code Refers to UTM
```js
const isUTM = require('utm-utils/src/isUTM');

isUTM(32619); // true
isUTM("32619"); // true
isUTM("EPSG:32619"); // true
isUTM("+proj=utm +zone=17 +ellps=WGS84 +datum=WGS84 +units=m +no_defs"); // true

isUTM("3857"); // false
```

## Get Hemisphere from EPSG Code
```js
const getHemisphere = require('utm-utils/src/getHemisphere');

getHemisphere('32617'); // "N"
```

## Get Zone from EPSG Code
```js
const getZone = require('utm-utils/src/getZone');

getZone('32617'); // 17
```

## Get PROJ String from EPSG Code
```js
const getProjString = require('utm-utils/src/getProjString');

getProjString('32617');
"+proj=utm +zone=17 +ellps=WGS84 +datum=WGS84 +units=m +no_defs"
```

## Get EPSG Code from a PROJ.4 String
```js
const getCodeFromProjString = require('utm-utils/src/getCodeFromProjString');

getCodeFromProjString("+proj=utm +zone=17 +ellps=WGS84 +datum=WGS84 +units=m +no_defs");
32617

getCodeFromProjString("+proj=utm +zone=16 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs +type=crs")
26916
```

## Get EPSG Code from ESRI Well-Known Text
```js
const getCodeFromEsriWKT = require('utm-utils/src/getCodeFromEsriWKT.js');

getCodeFromEsriWKT(`PROJCS["WGS_1984_UTM_Zone_17N",GEOGCS["GCS_WGS_1984",...,UNIT["Meter",1.0]]`);
32617
```

# Support
Email the package author at daniel.j.dufour@gmail.com or post an issue at https://github.com/danieljdufour/utm-utils/issues

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