Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/xayahsususu/geographiclib-go
Go implementation of GeographicLib(LocalCartesian)
https://github.com/xayahsususu/geographiclib-go
Last synced: 10 days ago
JSON representation
Go implementation of GeographicLib(LocalCartesian)
- Host: GitHub
- URL: https://github.com/xayahsususu/geographiclib-go
- Owner: XayahSuSuSu
- License: gpl-3.0
- Created: 2024-04-09T07:25:08.000Z (7 months ago)
- Default Branch: main
- Last Pushed: 2024-04-16T08:05:32.000Z (7 months ago)
- Last Synced: 2024-06-19T13:48:31.966Z (5 months ago)
- Language: C
- Size: 19.5 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# geographiclib-go
> Go implementation of [GeographicLib(LocalCartesian)](https://geographiclib.sourceforge.io/)[![GitHub release](https://img.shields.io/github/v/release/XayahSuSuSu/geographiclib-go?color=orange)](https://github.com/XayahSuSuSu/geographiclib-go/releases) [![License](https://img.shields.io/github/license/XayahSuSuSu/geographiclib-go?color=ff69b4)](./LICENSE)
## Installation and usage
1. Install
```
go get github.com/XayahSuSuSu/geographiclib-go
```2. Download **library** from [Releases](https://github.com/XayahSuSuSu/geographiclib-go/releases/latest)
3. Put the **library** into project directory
4. Set up **cgo** environment
5. Enable **cgo**
```
go env -w CGO_ENABLED=1
```6. Set up `CGO_LDFLAGS` **before** building
* Windows
```
$env:CGO_LDFLAGS="-L${path_to_lib} $env:CGO_LDFLAGS"
```
* Linux
```
export CGO_LDFLAGS="-L${path_to_lib} ${CGO_LDFLAGS}"
```
Replace `${path_to_lib}` with your **own path**7. Build
```
go build
```8. Make sure that the library is **in the same directory** as the executable file
## Build library locally
1. Clone this repo recursively
```
git clone --recursive https://github.com/XayahSuSuSu/geographiclib-go
```2. Build with [cmake](https://cmake.org/)
```
cd geographiclib-go/cgo
mkdir build && cd build
cmake -DCMAKE_BUILD_TYPE=Release ..
make
```## LICENSE
[GNU General Public License v3.0](./LICENSE)