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: 12 months 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 (over 4 years ago)
- Default Branch: master
- Last Pushed: 2022-02-20T12:50:29.000Z (over 4 years ago)
- Last Synced: 2024-06-21T08:45:23.225Z (about 2 years 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.
[](https://pkg.go.dev/github.com/EpicStep/go-simple-geo/v2)
[](https://github.com/EpicStep/go-simple-geo/actions/workflows/lint.yml)
[](https://github.com/EpicStep/go-simple-geo/actions/workflows/go.yml)
[](https://codecov.io/gh/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 main
import (
"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))
}
```