geoos

package module
v1.0.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 14, 2021 License: LGPL-2.1 Imports: 0 Imported by: 0

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

Structure

  1. Algorithm is the definition of spatial operation, which is outside exposing.
  2. strategy.go defines the implementation of the spatial computing based algorithm.

Documentation

How to use Geoos: Example: Calculating area via Geoos

package main

import (
  "encoding/json"
  "fmt"
  "github.com/spatial-go/geoos"
  "github.com/spatial-go/geoos/encoding/wkt"
  "github.com/spatial-go/geoos/geojson"
  "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)
  // 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

  rawJSON := []byte(`
  { "type": "FeatureCollection",
  "features": [
    { "type": "Feature",
    "geometry": {"type": "Point", "coordinates": [102.0, 0.5]},
    "properties": {"prop0": "value0"}
    }
  ]
  }`)

  fc := geojson.NewFeatureCollection()
  _ = json.Unmarshal(rawJSON, &fc)
  println("%p", fc)

  // Geometry will be unmarshalled into the correct geo.Geometry type.
  point := fc.Features[0].Geometry.(geoos.Point)
  println("%p", &point)

}

Maintainer

@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

Email Address: geoos@changjing.ai

License

Geoos is licensed under the: LGPL-2.1

Documentation

Index

Constants

View Source
const GeoosTestTag = true

GeoosTestTag Decide whether to perform test control

Variables

This section is empty.

Functions

This section is empty.

Types

This section is empty.

Directories

Path Synopsis
Package algorithm defines Specifies Computational Geometric and algorithm err.
Package algorithm defines Specifies Computational Geometric and algorithm err.
buffer
Package buffer define geomtry matrix conversion.
Package buffer define geomtry matrix conversion.
buffer/simplify
Package simplify define Douglas Peucker and Topology Preserving simplify.
Package simplify define Douglas Peucker and Topology Preserving simplify.
calc/angle
Package angle define angel calculation function.
Package angle define angel calculation function.
calc/bytevalues
Package bytevalues ead and write primitive datatypes from/to byte
Package bytevalues ead and write primitive datatypes from/to byte
filter
Package filter Define data filter function.
Package filter Define data filter function.
matrix
Package matrix Define spatial matrix base.
Package matrix Define spatial matrix base.
measure
Package measure Define spatial measurement function.
Package measure Define spatial measurement function.
operation
Package operation define valid func for geometries.
Package operation define valid func for geometries.
overlay/chain
Package chain Define Monotone Chains,it is a way of partitioning the segments of a linestring to allow for fast searching of intersections.
Package chain Define Monotone Chains,it is a way of partitioning the segments of a linestring to allow for fast searching of intersections.
overlay/sweepline
Package sweepline Contains struct which implement a sweepline algorithm for scanning geometric data structures.
Package sweepline Contains struct which implement a sweepline algorithm for scanning geometric data structures.
encoding
wkb
Package wkb is for decoding ESRI's Well Known Binary (WKB) format specification at https://en.wikipedia.org/wiki/Well-known_text_representation_of_geometry#Well-known_binary Package wkb is for decoding ESRI's Well Known Binary (WKB) format specification at https://en.wikipedia.org/wiki/Well-known_text_representation_of_geometry#Well-known_binary Package wkb is for decoding ESRI's Well Known Binary (WKB) format specification at https://en.wikipedia.org/wiki/Well-known_text_representation_of_geometry#Well-known_binary
Package wkb is for decoding ESRI's Well Known Binary (WKB) format specification at https://en.wikipedia.org/wiki/Well-known_text_representation_of_geometry#Well-known_binary Package wkb is for decoding ESRI's Well Known Binary (WKB) format specification at https://en.wikipedia.org/wiki/Well-known_text_representation_of_geometry#Well-known_binary Package wkb is for decoding ESRI's Well Known Binary (WKB) format specification at https://en.wikipedia.org/wiki/Well-known_text_representation_of_geometry#Well-known_binary
wkt
Package geocsv is a library for read csv file with geospatial data.
Package geocsv is a library for read csv file with geospatial data.
Package geojson is a library for encoding and decoding GeoJSON into Go structs using the geometries.
Package geojson is a library for encoding and decoding GeoJSON into Go structs using the geometries.
Package index define spatial index interface.
Package index define spatial index interface.
intervalrtree
Package intervalrtree Contains structs to implement an R-tree index for one-dimensional intervals.
Package intervalrtree Contains structs to implement an R-tree index for one-dimensional intervals.
kdtree
Package kdtree Contains classes which implement a k-D tree index over 2-D point data.
Package kdtree Contains classes which implement a k-D tree index over 2-D point data.
quadtree
Package quadtree A Quadtree is a spatial index structure for efficient range querying of items bounded by 2D rectangles.
Package quadtree A Quadtree is a spatial index structure for efficient range querying of items bounded by 2D rectangles.
Package planar provides support for the implementation of spatial operations and geometric algorithms.
Package planar provides support for the implementation of spatial operations and geometric algorithms.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL