s2-tools
Version:
A collection of geospatial tools primarily designed for WGS84, Web Mercator, and S2.
82 lines • 3.84 kB
TypeScript
import type { DatumParams } from '../readers/wkt';
import type { VectorPoint } from '../geometry';
import type { ProjectionParams, ProjectionTransform, Transformer } from '.';
/**
* Modifies projection parameters to properly define a datum
* @param params - projection specific parameters to be adjusted
* @param transformer - the projection transformer to potentially pull data from
*/
export declare function buildDatum(params: ProjectionParams, transformer: Transformer): void;
/**
* Compares datums to see if they have equal datums
* @param source - source projection starting from
* @param dest - destination projection to end at
* @returns true if projection datums are equal
*/
export declare function compareDatums(source: ProjectionTransform, dest: ProjectionTransform): boolean;
/**
* The function Convert_Geodetic_To_Geocentric converts geodetic coordinates
* (latitude, longitude, and height) to geocentric coordinates (X, Y, Z),
* according to the current ellipsoid parameters.
*
* Latitude : Geodetic latitude in radians (input)
* Longitude : Geodetic longitude in radians (input)
* Height : Geodetic height, in meters (input)
* X : Calculated Geocentric X coordinate, in meters (output)
* Y : Calculated Geocentric Y coordinate, in meters (output)
* Z : Calculated Geocentric Z coordinate, in meters (output)
* @param p - lon-lat WGS84 point
* @param es - eccentricity
* @param a - semi-major axis
*/
export declare function geodeticToGeocentric(p: VectorPoint, es: number, a: number): void;
/**
* converts a geocentric point to a geodetic point
* @param p - Geocentric point
* @param es - ellipsoid eccentricity
* @param a - ellipsoid semimajor axis
* @param b - ellipsoid semiminor axis
*/
export declare function geocentricToGeodetic(p: VectorPoint, es: number, a: number, b: number): void;
/**
* pj_geocentic_to_wgs84( p )
* p = point to transform in geocentric coordinates (x,y,z)
* point object, nothing fancy, just allows values to be
* passed back and forth by reference rather than by value.
* Other point classes may be used as long as they have
* x and y properties, which will get modified in the transform method.
* @param p - Geocentric point
* @param datumType - datum type
* @param datumParams - datum parameters
*/
export declare function geocentricToWgs84(p: VectorPoint, datumType: number, datumParams: DatumParams): void;
/**
* pj_geocentic_from_wgs84() coordinate system definition,
* point to transform in geocentric coordinates (x,y,z)
* @param p - lon-lat WGS84 point
* @param datumType - datum type
* @param datumParams - datum parameters
*/
export declare function geocentricFromWgs84(p: VectorPoint, datumType: number, datumParams: DatumParams): void;
/**
* check if either of the projections are not WGS84
* @param source - source projection
* @param dest - destination projection
* @returns - true if either of the projections are not WGS84
*/
export declare function checkNotWGS(source: ProjectionTransform, dest: ProjectionTransform): boolean;
/**
* Transforms a point from one datum to another
* @param point - lon-lat WGS84 point to mutate
* @param source - source projection
* @param dest - destination projection
*/
export declare function datumTransform(point: VectorPoint, source: ProjectionTransform, dest: ProjectionTransform): void;
/**
* Apply a grid shift given the source projection (assums a nadgrid has been set up)
* @param source - source projection
* @param inverse - if true, the grid shift is applied in reverse
* @param point - the point to apply the grid shift
*/
export declare function applyGridShift(source: ProjectionTransform, inverse: boolean, point: VectorPoint): void;
//# sourceMappingURL=datum.d.ts.map