Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
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
- Host: GitHub
- URL: https://github.com/edadma/n-vector
- Owner: edadma
- License: mit
- Created: 2015-06-13T20:34:14.000Z (over 9 years ago)
- Default Branch: master
- Last Pushed: 2015-06-21T20:41:10.000Z (over 9 years ago)
- Last Synced: 2023-09-11T05:50:27.104Z (over 1 year ago)
- Language: Scala
- Size: 129 KB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
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