Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

github.com/mattfarina/geo-go

Package Overview
Dependencies
Alerts
File Explorer
Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

github.com/mattfarina/geo-go

  • v0.0.0-20140228031647-824f90eb6dae
  • Source
  • Go
  • Socket score

Version published
Created
Source

Geo

A library in Go dealing with earth coordinate system (geodetic) calculations.

Build Status GoDoc Coverage Status

Locations

Locations are individual locations on the Earth.

location := NewLocation(lat, long)

From locations you can do things like calculate the distance between two of them. For example,

l1 := NewLocation(lat1, long1)
l2 := NewLocation(lat2, long2)
distance := l1.Distance(l2)

You can also us a location to find a range or longitudes and latitudes. This is useful for finding the corners on the little rectangle screens we look at too often. For example,

location := NewLocation(42.7186, -84.468466)
latMin, latMax := location.LatitudeRange(10000)
longMin, longMax := location.LongitudeRange(20000)

There are other operations you can find in the location.go code.

Earth

These locations are on the Earth and information for the earth is stored on Earth. For example, the method EarthRadius will return the radius of the Earth at a specified latitude. This takes into account that the earth is an irregular ellipsoid.

There are other operations that can be performed on the Earth. For more details see earth.go.

FAQs

Package last updated on 28 Feb 2014

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc