# as-geo-projection

> geo projection

Latest version **2.1.0** (published 2021-12-09) · MIT license · 0 weekly downloads

## Install

```sh
npm install as-geo-projection
pnpm add as-geo-projection
yarn add as-geo-projection
bun add as-geo-projection
```

## Health

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

Positive: has types; esm support; no vulnerabilities; high quality score.

Warnings: low downloads.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 2.1.0 |
| Published | 2021-12-09 |
| First published | 2021-09-02 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | ESM + CommonJS |
| Node | >=10 |
| Dependencies | 3 |
| Unpacked size | 36.9 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Maintainers | tarasov.mv |

## Links

- npm: https://www.npmjs.com/package/as-geo-projection
- Repository: https://github.com/TarasovMV/as-geo-projection
- Homepage: https://github.com/TarasovMV/as-geo-projection#readme
- Issues: https://github.com/TarasovMV/as-geo-projection/issues
- npm.io page: https://npm.io/package/as-geo-projection

## Dependencies (3)

- [proj4](https://npm.io/package/proj4.md) ^2.4.4
- [lodash.isnumber](https://npm.io/package/lodash.isnumber.md) ^3.0.3
- [lodash.isobject](https://npm.io/package/lodash.isobject.md) ^3.0.2

## Recent versions

- 2.1.0 (latest) — 2021-12-09
- 2.0.5 — 2021-12-09
- 2.0.4 — 2021-12-09
- 2.0.3 — 2021-12-09
- 2.0.2 — 2021-12-09
- 2.0.1 — 2021-12-09
- 2.0.0 — 2021-12-06
- 1.7.0 — 2021-09-19
- 1.6.0 — 2021-09-19
- 1.5.0 — 2021-09-02
- 1.3.0 — 2021-09-02
- 1.2.0 — 2021-09-02
- 1.1.0 — 2021-09-02
- 1.0.0 — 2021-09-02

## README

# as-geo-projection

Typescript module for biderectional converting Gauß-Krüger-coordinates into WGS84 latitide and longitude. Using zone: GOOGLE(EPSG:3857).

##Usage

###Functions
```typescript
import {toFlat, toWGS} from "as-geo-projection";

let wgs84 = toWGS({x: 4591270, y: 5819620}) // {longitude: 13.34255019849783, latitude: 52.50210050984162}
let gk = toFlat({longitude: 13.4, latitude: 52.5}) // {x: 4595175.488530577, y: 5819460.402152777}
```

###Class
```typescript
import {GeoProjection} from "as-geo-projection";

const geo = new GeoProjection();
geo.setBorders({
  wgs: {
    lt: {latitude: 55.0982678796, longitude: 73.1202739448},
    rb: {latitude: 55.0643063117, longitude: 73.2950520486},
  },
  flat: {
    lt: {x: 8139711.6621998055, y: 7380961.309697426,},
    rb: {x: 8159167.871716635, y: 7374356.672722412,},
  },
});
const res = geo.getRelativeByWgs({latitude: 55.0982678796, longitude: 73.2202739448});
```

###Default borders (use if not set borders)
```typescript
geo.setBorders({
    wgs: {
        lt: { latitude: 55.0982678796, longitude: 73.1202739448 },
        rb: { latitude: 55.0643063117, longitude: 73.2950520486 },
    },
    flat: {
        lt: { x: 8139711.6621998055, y: 7380961.309697426, },
        rb: { x: 8159167.871716635, y: 7374356.672722412, },
    }
};
```

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