Coder Social home page Coder Social logo

arikw / itm-to-wgs84-converter Goto Github PK

View Code? Open in Web Editor NEW
0.0 1.0 0.0 32 KB

A Zero dependency ITM to WGS84 coordinates converter

Home Page: https://www.npmjs.com/package/itm-to-wgs84-converter/

License: Other

JavaScript 100.00%
coordinates-transformations datum datum-transformations itm wgs wgs84 ics israel

itm-to-wgs84-converter's Introduction

ITM (Israeli Transverse Mercator) to WGS84 Converter

A Zero dependency ITM to WGS84 coordinates converter

Installation

npm install itm-to-wgs84-converter

Usage

Node

// CommonJS
const ItmToWgs84Converter = require('itm-to-wgs84-converter');

// ES Module
import ItmToWgs84Converter from 'itm-to-wgs84-converter';

Browser (CDN)

// Classic
<script src="https://cdn.jsdelivr.net/gh/arikw/itm-to-wgs84-converter@1/src/index.js"></script>

// ES Module
import ItmToWgs84Converter from 'https://cdn.jsdelivr.net/gh/arikw/itm-to-wgs84-converter@1/dist/itm-to-wgs84-converter.browser.mjs';

Usage Examples

// ITM to WGS84
{
  const [ latitude, longitude ] = ItmToWgs84Converter.itm2wgs84(194140, 385060);
  // output: [29.553103541791266, 34.943293095766144]
}

// WGS84 to ITM
{
  const [ east, north ] = ItmToWgs84Converter.wgs842itm(29.553103541791266, 34.943293095766144);
  // output: [194140, 385060]
}

// ICS to WGS84
{
  const [ latitude, longitude ] = ItmToWgs84Converter.ics2wgs84(144140, 885060);
  // output: [29.553036125579155, 34.943337203496604]
}

// WGS84 to ICS
{
  const [ east, north ] = ItmToWgs84Converter.wgs842ics(29.553036125579155, 34.943337203496604);
  // output: [144140, 885060]
}

About

This package is based on the work of Joseph Gray who created the original C++ version and Michael Siton who created the C# version.

itm-to-wgs84-converter's People

Contributors

arikw avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.