Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/spatial-go/geoos
A library provides spatial data and geometric algorithms
https://github.com/spatial-go/geoos
geometry-library geospatial gis golang
Last synced: 2 months ago
JSON representation
A library provides spatial data and geometric algorithms
- Host: GitHub
- URL: https://github.com/spatial-go/geoos
- Owner: spatial-go
- License: lgpl-2.1
- Created: 2021-03-23T03:28:08.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2024-07-03T13:45:37.000Z (3 months ago)
- Last Synced: 2024-07-12T12:36:21.816Z (3 months ago)
- Topics: geometry-library, geospatial, gis, golang
- Language: Go
- Homepage: http://www.spatial-go.com
- Size: 12.8 MB
- Stars: 605
- Watchers: 17
- Forks: 129
- Open Issues: 17
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
- awesome-go - geoos - A library provides spatial data and geometric algorithms. (Geographic / Search and Analytic Databases)
README
# Geoos
Our organization `spatial-go` is officially established! The first open source project `Geoos`(Using `Golang`) provides spatial data and geometric algorithms.
All comments and suggestions are welcome!## Guides
http://www.spatial-go.com
## Contents
- [Guides](#guides)
- [Contents](#contents)
- [Structure](#structure)
- [Documentation](#documentation)
- [Maintainer](#maintainer)
- [Contributing](#contributing)
- [License](#license)## Structure
1.algorithm
Package algorithm defines Specifies Computational Geometric and algorithm err.
2.clusters
Package clusters is a spatial clustering algorithm.
3.coordtransform
Package coordtransform is for transform coord.
4.example
Example This is an example .
5.geoencoding
Package geoencoding is a library for encoding and decoding into Go structs using the geometries.
6.grid
Package grid is used to generate grid data.
7.index
Package index define spatial index interface.
8.planar
Package planar provides support for the implementation of spatial operations and geometric algorithms.
9.space
Package space A representation of a linear vector geometry.
10.utils
Package utils A functions of utils.## Documentation
How to use `Geoos`:
Example: Calculating `area` via `Geoos`
```
package mainimport (
"bytes"
"fmt""github.com/spatial-go/geoos/geoencoding"
"github.com/spatial-go/geoos/planar"
)func main() {
// First, choose the default algorithm.
strategy := planar.NormalStrategy()
// Secondly, manufacturing test data and convert it to geometry
const polygon = `POLYGON((-1 -1, 1 -1, 1 1, -1 1, -1 -1))`
// geometry, _ := wkt.UnmarshalString(polygon)buf0 := new(bytes.Buffer)
buf0.Write([]byte(polygon))
geometry, _ := geoencoding.Read(buf0, geoencoding.WKT)// Last, call the Area () method and get result.
area, e := strategy.Area(geometry)
if e != nil {
fmt.Printf(e.Error())
}
fmt.Printf("%f", area)
// get result 4.0
}
```
Example: geoencoding
[example_encoding.go](https://github.com/spatial-go/geoos/example/example_encoding.go)## Maintainer
[@spatial-go](https://github.com/spatial-go)。
## Contributing
We will also uphold the concept of "openness, co-creation, and win-win" to contribute in the field of space computing.
Welcome to join us ![please report an issue](https://github.com/spatial-go/geoos/issues/new)
Email Address: [[email protected]](mailto:[email protected])
## License
`Geoos` is licensed under the:
[LGPL-2.1 ](LICENSE)