Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/epicstep/go-simple-geo
go-simple-geo is a library for simple geo calculations.
https://github.com/epicstep/go-simple-geo
geo
Last synced: about 1 month ago
JSON representation
go-simple-geo is a library for simple geo calculations.
- Host: GitHub
- URL: https://github.com/epicstep/go-simple-geo
- Owner: EpicStep
- License: mit
- Created: 2021-12-06T18:59:56.000Z (about 3 years ago)
- Default Branch: master
- Last Pushed: 2022-02-20T12:50:29.000Z (almost 3 years ago)
- Last Synced: 2024-06-21T08:45:23.225Z (6 months ago)
- Topics: geo
- Language: Go
- Homepage:
- Size: 14.6 KB
- Stars: 20
- Watchers: 2
- Forks: 1
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
go-simple-geo is a library for simple geo calculations.
[![Go Reference](https://pkg.go.dev/badge/github.com/EpicStep/go-simple-geo.svg)](https://pkg.go.dev/github.com/EpicStep/go-simple-geo/v2)
[![Lint](https://github.com/EpicStep/go-simple-geo/actions/workflows/lint.yml/badge.svg)](https://github.com/EpicStep/go-simple-geo/actions/workflows/lint.yml)
[![Tests](https://github.com/EpicStep/go-simple-geo/actions/workflows/go.yml/badge.svg)](https://github.com/EpicStep/go-simple-geo/actions/workflows/go.yml)
[![codecov](https://codecov.io/gh/EpicStep/go-simple-geo/branch/master/graph/badge.svg?token=UE3A8O81TA)](https://codecov.io/gh/EpicStep/go-simple-geo)
[![Go Report Card](https://goreportcard.com/badge/github.com/EpicStep/go-simple-geo)](https://goreportcard.com/report/github.com/EpicStep/go-simple-geo)----
## Installation
```bash
go get github.com/EpicStep/go-simple-geo/v2
```## Example
```go
package mainimport (
"fmt"
"github.com/EpicStep/go-simple-geo/v2/geo"
)func main() {
c1 := geo.NewCoordinatesFromDegrees(55.7522, 37.6156)
c2 := geo.NewCoordinatesFromDegrees(59.9386, 30.3141)fmt.Println(c1.Distance(c2))
}
```