maths

package
v0.3.1 Latest Latest
Warning

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

Go to latest
Published: Jan 4, 2017 License: MIT Imports: 2 Imported by: 0

Documentation

Overview

Package math contins generic math functions that we need for doing transforms. this package will augment the go math library.

Index

Constants

View Source
const (
	WebMercator = tegola.WebMercator
	WGS84       = tegola.WGS84
	Deg2Rad     = math.Pi / 180
	Rad2Deg     = 180 / math.Pi
	PiDiv2      = math.Pi / 2.0
	PiDiv4      = math.Pi / 4.0
)

Variables

This section is empty.

Functions

func AreaOfPolygon

func AreaOfPolygon(p tegola.Polygon) (area float64)

AreaOfPolygon will calculate the Area of a polygon using the surveyor's formula (https://en.wikipedia.org/wiki/Shoelace_formula)

func DegToRad

func DegToRad(deg float64) float64

func RadToDeg

func RadToDeg(rad float64) float64

Types

This section is empty.

Directories

Path Synopsis
Package webmercator does the translation to and from WebMercator and WGS84 Gotten from: http://wiki.openstreetmap.org/wiki/Mercator#C.23
Package webmercator does the translation to and from WebMercator and WGS84 Gotten from: http://wiki.openstreetmap.org/wiki/Mercator#C.23

Jump to

Keyboard shortcuts

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