UNPKG

s2-tools

Version:

A collection of geospatial tools primarily designed for WGS84, Web Mercator, and S2.

97 lines 2.68 kB
import { ProjectionBase } from '.'; import type { VectorPoint } from '../../geometry'; import type { ProjectionParams, ProjectionTransform } from '.'; /** * The 4 possible modes of the TiltedPerspective projection * - North Pole (0) * - South Pole (1) * - Equator (2) * - Oblique (3) */ export declare enum MODE { /** North Pole */ N_POLE = 0, /** South Pole */ S_POLE = 1, /** Equator */ EQUIT = 2, /** Oblique */ OBLIQ = 3 } /** * # Tilted Perspective * * Tilted Perspective is similar to `nsper` in that it simulates a * perspective view from a height. Where `nsper` projects onto a plane tangent to * the surface, Tilted Perspective orients the plane towards the direction of the * view. Thus, extra parameters specifying azimuth and tilt are required beyond * `nsper`'s `h`. As with `nsper`, `lat_0` & `lon_0` are * also required for satellite position. * * **Classification**: Azimuthal * * **Available forms**: Forward and inverse, spherical projection * * **Defined area**: Global * * **Alias**: tpers * * **Domain**: 2D * * **Input type**: Geodetic coordinates * * **Output type**: Projected coordinates * * ## Projection String * ``` * +proj=tpers +h=5500000 +lat_0=40 * ``` * * ## Required Parameters * - `+h`: Height of the perspective view. * - `+lat_0`: Latitude of the projection center. * - `+lon_0`: Longitude of the projection center. * * ## Optional Parameters * - `+azi=<value>`: Bearing in degrees away from north. *Defaults to 0.0.* * - `+tilt=<value>`: Angle in degrees away from nadir. *Defaults to 0.0.* * * ![Tilted perspective](https://github.com/Open-S2/s2-tools/blob/master/assets/proj4/projections/images/tpers.png?raw=true) */ export declare class TiltedPerspective extends ProjectionBase implements ProjectionTransform { name: string; static names: string[]; mode: MODE; h: number; azi: number; tilt: number; long0: number; lat0: number; sinph0: number; cosph0: number; pn1: number; p: number; rp: number; h1: number; pfact: number; cg: number; sg: number; cw: number; sw: number; /** * Preps an TiltedPerspective projection * @param params - projection specific parameters */ constructor(params?: ProjectionParams); /** * TiltedPerspective forward equations--mapping lon-lat to x-y * @param p - lon-lat WGS84 point */ forward(p: VectorPoint): void; /** * TiltedPerspective inverse equations--mapping x-y to lon-lat * @param p - TiltedPerspective point */ inverse(p: VectorPoint): void; } //# sourceMappingURL=tpers.d.ts.map