Documentation ¶
Overview ¶
Package proj provides an interface to what once was the Cartographic Projections Library PROJ.4 [cartography].
See: https://proj.org
This version works with the newer PROJ library, starting with version 5.
Example usage:
merc, err := proj.NewProj("+proj=merc +ellps=clrk66 +lat_ts=33") defer merc.Close() // if omitted, this will be called on garbage collection if err != nil { log.Fatal(err) } ll, err := proj.NewProj("+proj=latlong") defer ll.Close() if err != nil { log.Fatal(err) } x, y, err := proj.Transform2(ll, merc, proj.DegToRad(-16), proj.DegToRad(20.25)) if err != nil { log.Fatal(err) } fmt.Printf("%.2f %.2f", x, y) // should print: -1495284.21 1920596.79
Index ¶
- func DegToRad(deg float64) float64
- func Fwd(proj *Proj, long, lat float64) (x, y float64, err error)
- func Inv(proj *Proj, x, y float64) (long, lat float64, err error)
- func RadToDeg(rad float64) float64
- func Transform2(srcpj, dstpj *Proj, x, y float64) (float64, float64, error)
- func Transform2lst(srcpj, dstpj *Proj, x, y []float64) ([]float64, []float64, error)
- func Transform3(srcpj, dstpj *Proj, x, y, z float64) (float64, float64, float64, error)
- func Transform3lst(srcpj, dstpj *Proj, x, y, z []float64) ([]float64, []float64, []float64, error)
- func UTMzone(lng, lat float64) (xzone int, yzone string, err error)
- type Proj
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Transform2lst ¶
func Transform3 ¶
func Transform3lst ¶
Types ¶
Click to show internal directories.
Click to hide internal directories.