1.0.3 • Published 1 year ago

vn2000-converter v1.0.3

Weekly downloads
-
License
MIT
Repository
github
Last release
1 year ago

vn2000-converter

A tool convert VN2000 coordinate system to WGS84 (GPS) and reverse
This tool is base on https://tool-online.com/en/coordinate-converter.php

Installation

  • Install via npm or yarn:
# install with npm
$ npm install vn2000-converter
# install with yarn
$ yarn add vn2000-converter
  • Include within your HTML
<script src="https://unpkg.com/vn2000-converter@1.0.0/dist/vn2000-converter.min.js"></script>

Usage

  • In a Node.js application.
const {vn2000_to_wgs84} = require('vn2000-converter');

const coordinate = vn2000_to_wgs84(557975.802, 1142228.861, 0, 'VN2000_DONG_THAP');
console.log(coordinate);
// {x: '105.53115606', y: '10.32843706', h: '-5.075'}
  • In a modular environment.
import vn2000_converter from 'vn2000-converter';
import {vn2000_to_wgs84, wgs84_to_vn2000} from 'vn2000-converter';

Functions

FunctionArgumentsDescription
vn2000_to_wgs84dx, xy, h, provinceConvert VN2000 coordinate system to WGS84 (GPS)
wgs84_to_vn2000dx, xy, h, provinceConvert WGS84 (GPS) coordinate system to VN2000
list_provinceList provinces of VN2000 coordinate system

Arguments

PropertyRequiredType/EnumComments
dxyesNumber, StringCoordinate x source
dxyesNumber, StringCoordinate y source
hyesNumber, StringCoordinate z source
provinceyesStringProvince of VN2000 coordinate system

Developing

Clone and install dependencies

git clone https://github.com/namlunkaka/vn2000-converter.git
cd vn2000-converter
npm install

Build the library

npm run build

Run test

npm run test

License

MIT © Namlun

1.0.2

1 year ago

1.0.1

1 year ago

1.0.3

1 year ago

1.0.0

2 years ago

0.0.2

2 years ago

0.0.1

2 years ago