Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/edadma/n-vector

n-vector geographic coordinate system
https://github.com/edadma/n-vector

Last synced: about 2 months ago
JSON representation

n-vector geographic coordinate system

Awesome Lists containing this project

README

        

n-vector
=======

**n-vector** is a package for performing geographical distance calculations using the so called *n-vector* geographic coordinate system.

Here is an example that computes a distant point 100 kilometers north-west of Montreal (Canada).

import ca.hyperreal.nvector

object Main extends App
{
val montreal = Geo(45.5017, -73.5673)
val nw100km = distant( montreal, NorthWest, 100 )

println( montreal )
println( nw100km )
println( distance(montreal, nw100km) formatted "%.2f" )
}

The above code prints

Geo(45.5017,-73.5673)
Geo(46.133970000952324,-74.48496234819456)
100.00