CubeProj
Extends: Proj
Source: cube.ts:111
Projection of a cube inflated to the ellipsoid. Native coordinates of a point: lon is the face index plus the position from west to east, lat is the position from south to north, both positions are from 0 to 1.
Constructor
new CubeProj(code: string, equiangular: boolean): CubeProjParameters
code(string) — Projection code.equiangular(boolean) — True when equal steps on a face are equal angles, false when they are equal distances on the plane of the face, as in a common cube map.
Instance Methods
toPlane(position: number): number
Returns the coordinate on the plane of a face, from -1 to 1, of the position on it, from 0 to 1.
Parameters
position(number) — Position on the face.
Returns
number
fromPlane(coordinate: number): number
Returns the position on a face, from 0 to 1, of the coordinate on its plane, from -1 to 1. It goes on beyond the face for a coordinate beyond it.
Parameters
coordinate(number) — Coordinate on the face plane.
Returns
number
toLonLat(lon: number, lat: number, face?: number): LonLat
Returns the geodetic coordinates of the point on the cube. The direction of the cube point is the surface normal of the ellipsoid in it.
Parameters
lon(number) — Native longitude.lat(number) — Native latitude.face(number, optional) — Face index, it is needed on the east edge of a face: the longitude is the next face there.
Returns
fromLonLat(lonLat: LonLat): LonLat
Returns the native coordinates of the geodetic point.
Parameters
lonLat(LonLat) — Geodetic coordinates.
Returns
equal(proj: Proj): boolean
Inherited from Proj#equal
Overrides: Proj#equal
Compare projections.
Parameters
proj(Proj) — Projection object.
Returns
boolean