# 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
Contents
Structure
Algorithm
is the definition of spatial operation, which is outside exposing.strategy.go
defines the implementation of the spatial computing based algorithm.
Documentation
How to use Geoos
:
Example: Calculating area
via Geoos
package main
import (
"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
Maintainer
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
Email Address: [email protected]
License
Geoos
is licensed under the:
LGPL-2.1
# Packages
Package algorithm defines Specifies Computational Geometric and algorithm err.
Package clusters is a spatial clustering algorithm.
Package coordtransform is for transform coord.
Example This is an example .
Package geoencoding is a library for encoding and decoding into Go structs using the geometries.
Package grid is used to generate grid data.
Package index define spatial index interface.
Package planar provides support for the implementation of spatial operations and geometric algorithms.
Package space A representation of a linear vector geometry.
Package utils A functions of utils.
# Constants
GeoosTestTag Decide whether to perform test control.