proj

package
v0.0.0-...-05a1c04 Latest Latest
Warning

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

Go to latest
Published: Aug 26, 2020 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

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

Variables

View Source
var (
	WebMercatorBounds = &webmercator.Extent
	WGS84Bounds       = &geom.Extent{-180.0, -85.0511, 180.0, 85.0511}
)

Functions

func ApplyToPoints

func ApplyToPoints(geometry geom.Geometry, f func(coords ...float64) ([]float64, error)) (geom.Geometry, error)

ApplyToPoints applys the given function to each point in the geometry and any sub geometries, return a new transformed geometry.

func CloneGeometry

func CloneGeometry(geometry geom.Geometry) (geom.Geometry, error)

CloneGeomtry returns a deep clone of the Geometry.

func FromWebMercator

func FromWebMercator(SRID uint64, geometry geom.Geometry) (geom.Geometry, error)

FromWebMercator takes a geometry encoded with WebMercator, and returns a Geometry encodes to the given srid.

func ToWebMercator

func ToWebMercator(SRID uint64, geometry geom.Geometry) (geom.Geometry, error)

ToWebMercator takes a SRID and a geometry encode using that srid, and returns a geometry encoded as a WebMercator.

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