Documentation ¶
Index ¶
- Constants
- func DegToRad(deg float64) float64
- func RadToDeg(rad float64) float64
- type Context
- type Direction
- type LibInfo
- type PJ
- func (p *PJ) Close()
- func (p *PJ) Dist(u1, v1, u2, v2 float64) (float64, error)
- func (p *PJ) Dist3(u1, v1, w1, u2, v2, w2 float64) (float64, error)
- func (p *PJ) Info() (ProjInfo, error)
- func (p *PJ) Trans(direction Direction, u1, v1, w1, t1 float64) (u2, v2, w2, t2 float64, err error)
- func (p *PJ) TransSlice(direction Direction, u1, v1, w1, t1 []float64) (u2, v2, w2, t2 []float64, err error)
- type ProjInfo
Constants ¶
Variables ¶
This section is empty.
Functions ¶
Types ¶
type LibInfo ¶
type LibInfo struct { Major int // Major version number. Minor int // Minor version number. Patch int // Patch level of release. Release string // Release info. Version number and release date, e.g. “Rel. 4.9.3, 15 August 2016”. Version string // Text representation of the full version number, e.g. “4.9.3”. Searchpath string // Search path for PROJ. List of directories separated by semicolons (Windows) or colons (non-Windows). }
type PJ ¶
type PJ struct {
// contains filtered or unexported fields
}
A projection object
func (*PJ) Dist ¶
Calculate geodesic distance between two points in geodetic coordinates
The calculated distance is between the two points located on the ellipsoid
func (*PJ) Dist3 ¶
Calculate geodesic distance between two points in geodetic coordinates
Similar to Dist() but also takes the height above the ellipsoid into account
func (*PJ) TransSlice ¶
func (p *PJ) TransSlice(direction Direction, u1, v1, w1, t1 []float64) (u2, v2, w2, t2 []float64, err error)
Transform a series of coordinates, where the individual coordinate dimension may be represented by a slice that is either
1. fully populated
2. nil and/or a length of zero, which will be treated as a fully populated slice of zeroes
3. of length one, i.e. a constant, which will be treated as a fully populated slice of that constant value
Note: if an input coordinate is constant, but the output coordinate varies, you need to supply a fully populated slice as input
type ProjInfo ¶
type ProjInfo struct { ID string // Short ID of the operation the PJ object is based on, that is, what comes afther the +proj= in a proj-string, e.g. “merc”. Description string // Long describes of the operation the PJ object is based on, e.g. “Mercator Cyl, Sph&Ell lat_ts=”. Definition string // The proj-string that was used to create the PJ object with, e.g. “+proj=merc +lat_0=24 +lon_0=53 +ellps=WGS84”. HasInverse bool // True if an inverse mapping of the defined operation exists, Accuracy float64 // Expected accuracy of the transformation. -1 if unknown. }