MCPcopy
hub / github.com/golang/geo / MercatorProjection

Struct MercatorProjection

s2/projections.go:161–165  ·  view source on GitHub ↗

MercatorProjection defines the spherical Mercator projection. Google Maps uses this projection together with WGS84 coordinates, in which case it is known as the "Web Mercator" projection (see Wikipedia). This class makes no assumptions regarding the coordinate system of its input points, but simply

Source from the content-addressed store, hash-verified

159// a Mercator edge where one endpoint is a pole. If you need to do this, clip
160// the edge first so that the "y" coordinate is no more than about 5 * maxX.)
161type MercatorProjection struct {
162 xWrap float64
163 toRadians float64 // Multiplier to convert coordinates to radians.
164 fromRadians float64 // Multiplier to convert coordinates from radians.
165}
166
167// NewMercatorProjection constructs a Mercator projection with the given maximum
168// longitude axis value corresponding to a range of [-maxLng, maxLng].

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected