# geotransform

> GIS坐标转换工具

Latest version **1.0.17** (published 2021-06-28) · ISC license · 0 weekly downloads

## Install

```sh
npm install geotransform
pnpm add geotransform
yarn add geotransform
bun add geotransform
```

## 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.0.17 |
| Published | 2021-06-28 |
| First published | 2021-02-05 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 2 |
| Unpacked size | 1.1 MB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | shiwenbin |
| Maintainers | shiwenbin |

## Links

- npm: https://www.npmjs.com/package/geotransform
- npm.io page: https://npm.io/package/geotransform

## Dependencies (2)

- [proj4](https://npm.io/package/proj4.md) ^2.7.0
- [gcoord](https://npm.io/package/gcoord.md) ^0.2.3

## Recent versions

- 1.0.17 (latest) — 2021-06-28
- 1.0.16 — 2021-06-28
- 1.0.15 — 2021-06-02
- 1.0.14 — 2021-06-02
- 1.0.13 — 2021-04-12
- 1.0.12 — 2021-04-08
- 1.0.11 — 2021-04-08
- 1.0.10 — 2021-04-08
- 1.0.9 — 2021-04-08
- 1.0.8 — 2021-02-05

## README

### GIS坐标转换工具
该工具引用 gcoord https://www.npmjs.com/package/gcoord 和 proj4库, 实现坐标任意转换。

使用方法: 
npm安装：npm install geotransform --save
```
  import GeoTransform from "geotransform";
  let gt = new GeoTransform();
  let coords = [113.620605, 34.748383];
  let transCoords = gt.transform("WGS84", "EPSG:4547", coords);
  let transCoords1 = gt.transform("GCJ02", "EPSG:4547", coords);
  let transCoords2 = gt.transform("GCJ02", "WGS84", coords);
  let transCoords3 = gt.transform("EPSG:4326", "EPSG:4547", coords);
  let transCoords4 = gt.transform("EPSG:4326", "GCJ02", coords);
```
  /**
   * 坐标转换方法 gt.transform(fromSR, toSR, coords);
   * @param {*} fromSR 转换前的坐标系
   * @param {*} toSR 转换后的坐标系
   * @param {*} coordinates 坐标值[x, y]
  */

  支持EPSG编码坐标系转换，与非EPSG互转

  非EPSG支持以下互转
 ```
    "GCJ02"    -> "高德坐标"
    "BD09"     -> "百度坐标"
    "BD09MC"   -> "百度墨卡托坐标"
    "EPSG3857" -> "墨卡托坐标"
    "WGS84"    -> "84地理坐标"
```

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