MaxGraey / as-geo-web-coordinate

A small library to handle Geo Web Coordinates

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

as-geo-web-coordinate

An AssemblyScript implementation of converting GeoWebCoordinate to GPS coordinates. See the spec.

Install

npm install as-geo-web-coordinate

Usage

Convert GPS -> Geo Web Coordinate

import { GeoWebCoordinate } from "as-geo-web-coordinate";

let lon = 110.0;
let lat = 38.0;

let gwCoord: u64 = GeoWebCoordinate.from_gps(lon, lat);

Convert Geo Web Coordinate -> GPS Bounding Box

import { GeoWebCoordinate } from "as-geo-web-coordinate";

let gpsCoords: u64 = GeoWebCoordinate.to_gps(gwCoord);

Tests

See tests for more usage.

npm test

About

A small library to handle Geo Web Coordinates

License:MIT License


Languages

Language:WebAssembly 95.5%Language:TypeScript 3.4%Language:JavaScript 1.2%