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

Struct PlateCarreeProjection

s2/projections.go:82–86  ·  view source on GitHub ↗

PlateCarreeProjection defines the "plate carree" (square plate) projection, which converts points on the sphere to (longitude, latitude) pairs. Coordinates can be scaled so that they represent radians, degrees, etc, but the projection is always centered around (latitude=0, longitude=0). Note that (

Source from the content-addressed store, hash-verified

80// longitude) ordering, in order to match the usual convention for graphs in
81// which "x" is horizontal and "y" is vertical.
82type PlateCarreeProjection struct {
83 xWrap float64
84 toRadians float64 // Multiplier to convert coordinates to radians.
85 fromRadians float64 // Multiplier to convert coordinates from radians.
86}
87
88// NewPlateCarreeProjection constructs a plate carree projection where the
89// x-coordinates (lng) span [-xScale, xScale] and the y coordinates (lat)

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected