-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
996e333
commit b4fd71f
Showing
3 changed files
with
26 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,25 @@ | ||
# flatsphere | ||
A library for converting between spherical and planar coordinates. | ||
|
||
[![GoReportCard](https://goreportcard.com/badge/owlpinetech/flatsphere)](https://goreportcard.com/report/github.com/owlpinetech/flatsphere) | ||
|
||
A [Go][] library for converting between spherical and planar coordinates. | ||
|
||
## Prerequisites | ||
|
||
- **[Go][]**: any one of the **three latest major** [releases][go-releases]. | ||
|
||
## Install | ||
|
||
go get github.com/owlpinetech/flatsphere | ||
|
||
## Usage | ||
|
||
// converting from one projection to another | ||
origProj := flatsphere.NewMercator() | ||
newProj := flatsphere.NewLambert() | ||
lat, lon := origProj.Inverse(origX, origY) | ||
newX, newY := newProj.Project(lat, lon) | ||
|
||
## Credits | ||
|
||
Inspired by the [Map-Projections](https://github.com/jkunimune/Map-Projections) library made by [@jkunimune](https://github.com/jkunimune). Right now this library is essentially a Go-flavored port of his original Java, minus a few things to keep it focused on library use cases. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
module github.com/owlpinetech/flatsphere | ||
|
||
go 1.21.5 | ||
go 1.19 |