/** @packageDocumentation * @module OrbitGT */ declare type int32 = number; declare type float64 = number; import { AList } from "../../system/collection/AList"; import { Coordinate } from "../geom/Coordinate"; import { Axis } from "./Axis"; import { CoordinateSystem } from "./CoordinateSystem"; import { Datum } from "./Datum"; import { Ellipsoid } from "./Ellipsoid"; import { Operation } from "./Operation"; import { OperationMethod } from "./OperationMethod"; import { VerticalModel } from "./VerticalModel"; /** * Class CRS defines the parameters of a coordinate reference system. * NOTE: geographic (lon-lat) CRSs have their coordinates in degrees (0..360) instead of radians (0..2PI). * NOTE: geocentric (ECEF) CRSs have their coordinates in meters. * * Based on the following document: * * Coordinate Conversions and Transformations including Formulas * Guidance Note Number 7, part 2 * Revised May 2005 * Available at: http://www.epsg.org/ * * @version 1.0 July 2005 */ /** @internal */ export declare class CRS { /** The type of a compound CRS */ static readonly COMPOUND: int32; /** The type of a engineering CRS */ static readonly ENGINEERING: int32; /** The type of a geocentric CRS */ static readonly GEOCENTRIC: int32; /** The type of a geographic-2D CRS */ static readonly GEOGRAPHIC_2D: int32; /** The type of a geographic-3D CRS */ static readonly GEOGRAPHIC_3D: int32; /** The type of a projected CRS */ static readonly PROJECTED: int32; /** The type of a vertical CRS */ static readonly VERTICAL: int32; /** The identification code of the WGS 84 geocentric reference system */ static readonly WGS84_GEOCENTRIC_CRS_CODE: int32; /** The identification code of the WGS 84 3D coordinate reference system */ static readonly WGS84_3D_CRS_CODE: int32; /** The identification code of the WGS 84 2D coordinate reference system */ static readonly WGS84_2D_CRS_CODE: int32; /** The identification code of the WGS 84 datum */ private static readonly WGS84_DATUM_CODE; /** The identification code of the WGS 84 geocentric coordinate reference system */ static readonly CRS_WGS84_GEOCENTRIC: string; /** The identification code of the WGS 84 geographic coordinate reference system */ static readonly CRS_WGS84_3D: string; /** The identification code of the WGS 84 2D coordinate reference system */ static readonly CRS_WGS84_2D: string; /** The cache of the WGS 84 geocentric coordinate reference system (4978) */ private static _CACHE_WGS84_GEOCENTRIC; /** The cache of the WGS 84 geographic coordinate reference system (4979) */ private static _CACHE_WGS84_3D; /** The cache of the WGS 84 2D coordinate reference system (4326) */ private static _CACHE_WGS84_2D; /** The code */ private _code; /** The name */ private _name; /** The area of use */ private _area; /** The type (PROJECTED,GEOGRAPHIC_2D,GEOGRAPHIC_3D,GEOCENTRIC,VERTICAL,COMPOUND,...) */ private _type; /** The coordinate-system code */ private _csCode; /** The coordinate axes (defined by the csCode) */ private _axes; /** The coordinate system (can be null) */ private _coordinateSystem; /** The datum */ private _datum; /** The base geographic CRS */ private _baseCRS; /** The projection (from the base CRS to this CRS) */ private _projection; /** The transformations from the base geocentric CRS to the geocentric WGS (CRS 4326) */ private _transformationsToWGS; /** The default transformation from the base geocentric CRS to the geocentric WGS (CRS 4326) */ private _transformationToWGS; /** The horizontal CRS (type COMPOUND) */ private _horizontalComponent; /** The vertical CRS (type COMPOUND) */ private _verticalComponent; /** The vertical model (type VERTICAL) */ private _verticalModel; /** The text information (WKT) of the CRS */ private _textForm; /** The access time of the CRS (for garbage collecting the dynamic CRS) */ private _accessTime; /** * Create a new CRS. * @param code the code. * @param name the name. * @param area the area of use. * @param type the type. * @param csCode the coordinate-system code. * @param datum the datum. * @param baseCRS the base geographic CRS. * @param projection the projection (from the base CRS to this CRS). * @param transformationsToWGS the transformations from the base geographic CRS to the WGS 84 datum (of CRS 4326). */ constructor(code: int32, name: string, area: int32, type: int32, csCode: int32, datum: Datum, baseCRS: CRS, projection: Operation, transformationsToWGS: AList); /** * Create a compound CRS. * @param code the code. * @param name the name. * @param area the area of use. * @param horizontalCRS the horizontal CRS. * @param verticalCRS the vertical CRS. * @return the compound CRS. */ static createCompound(code: int32, name: string, area: int32, horizontalCRS: CRS, verticalCRS: CRS): CRS; /** * Get the code. * @return the code. */ getCode(): int32; /** * Get the string code. * @return the string code. */ getStringCode(): string; /** * Check if a code matches the CRS code. * @param code the code. * @return true if the code matches. */ hasStringCode(code: string): boolean; /** * Get the name. * @return the name. */ getName(): string; /** * Get the area of use. * @return the area. */ getArea(): int32; /** * Get the type. * @return the type. */ getType(): int32; /** * Get the type label. * @return the type label. */ getTypeLabel(): string; /** * Is this a geocentric CRS? * @return true for a geocentric CRS. */ isGeoCentric(): boolean; /** * Is this a geographic CRS? * @return true for a projected CRS. */ isGeoGraphic(): boolean; /** * Is this a geographic 2D CRS? * @return true for a projected 2D CRS. */ isGeoGraphic2D(): boolean; /** * Is this a geographic 3D CRS? * @return true for a projected 3D CRS. */ isGeoGraphic3D(): boolean; /** * Is this a projected CRS? * @return true for a projected CRS. */ isProjectedType(): boolean; /** * Is this a projected CRS? * @return true for a projected CRS. */ isProjected(): boolean; /** * Is this a vertical CRS? * @return true for a vertical CRS. */ isVertical(): boolean; /** * Is this a compound CRS? * @return true for a compound CRS. */ isCompound(): boolean; /** * Get the coordinate-system code. * @return the coordinate-system code. */ getCoordinateSystemCode(): int32; /** * Get the coordinate system. * @return the coordinate system (can be null if standard). */ getCoordinateSystem(): CoordinateSystem; /** * Get the datum. * @return the datum. */ getDatum(): Datum; /** * Get the code of the datum. * @return the code of the datum (0 if there is no datum). */ getDatumCode(): int32; /** * Set the datum. * @param datum the new datum (if null check the base CRS). */ setDatum(datum: Datum): void; /** * Get the ellipsoid. * @return the ellipsoid. */ getEllipsoid(): Ellipsoid; /** * Get the base geographic CRS. * @return the base geographic CRS. */ getBaseCRS(): CRS; /** * Set the base geographic CRS. * @param baseCRS the new base geographic CRS. */ setBaseCRS(baseCRS: CRS): void; /** * Get the coordinate axis of the CRS. * @return the coordinate axis of the CRS. */ getAxes(): AList; /** * Set the coordinate axis of the CRS. * @param axis the coordinate axis of the CRS. */ setAxes(axes: AList): void; /** * Get the unit code of the first coordinate axis of the CRS. * @return the unit code (defaults to METER). */ getFirstAxisUnitCode(): int32; /** * Get the projection (from the base CRS to this CRS). * @return the projection. */ getProjection(): Operation; /** * Set the projection (from the base CRS to this CRS). * @param projection the projection. */ setProjection(projection: Operation): void; /** * Get the projection method (from the base CRS to this CRS). * @return the projection method. */ getProjectionMethod(): OperationMethod; /** * Get the horizontal component of a compound CRS. * @return the horizontal component of a compound CRS. */ getHorizontalComponent(): CRS; /** * Check if there is a vertical component (only for type COMPOUND). * @return true if there is a vertical component. */ hasVerticalComponent(): boolean; /** * Get the vertical component of a compound CRS. * @return the vertical component of a compound CRS. */ getVerticalComponent(): CRS; /** * Get the vertical model (only for type VERTICAL). * @return the vertical model. */ getVerticalModel(): VerticalModel; /** * Set the vertical model (only for type VERTICAL). * @param verticalModel the vertical model. */ setVerticalModel(verticalModel: VerticalModel): void; /** * Peek at the transformations from the base geographic CRS to the WGS 84 datum (of CRS 4326). * @return the transformations. */ peekTransformationsToWGS(): AList; /** * Get the transformations from the base geographic CRS to the WGS 84 datum (of CRS 4326). * @return the transformations. */ getTransformationsToWGS(): AList; /** * Set the transformations from the base geographic CRS to the WGS 84 datum (of CRS 4326). * @param transformations the transformations. */ setTransformationsToWGS(transformations: AList): void; /** * Get the default transformation from the base geographic CRS to the WGS 84 datum (of CRS 4326). * @return a transformation (null if not available). */ getTransformationToWGS(): Operation; /** * Set the default transformation from the base geographic CRS to the WGS 84 datum (of CRS 4326). * @param transformation a transformation (null if not available). */ setTransformationToWGS(transformation: Operation): void; /** * Convert to a geocentric coordinate. * @param local the coordinate in this CRS. * @return the geocentric coordinate. */ toGeoCentric(local: Coordinate): Coordinate; /** * Convert from a geocentric coordinate. * @param geocentric the geocentric coordinate. * @return the coordinate in this CRS. */ fromGeoCentric(geocentric: Coordinate): Coordinate; /** * Check if this CRS is a projection of another CRS. * @param geographic the geographic CRS to check. * @return true if this is a projection of the geographic CRS. */ isProjectionOf(geographic: CRS): boolean; /** * Convert from a geographic coordinate to a projected coordinate. * @param geographic the source geographic coordinate (in degrees). * @param projected the target projected coordinate (use null to create a new coordinate). * @return the projected coordinate. */ toProjected(geographic: Coordinate, projected: Coordinate): Coordinate; /** * Convert from a projected coordinate to a geographic coordinate. * @param projected the source projected coordinate. * @param geographic the target geographic coordinate (in degrees) (use null to create a new coordinate). * @return the geographic coordinate. */ fromProjected(projected: Coordinate, geographic: Coordinate): Coordinate; /** * Get the WGS 84 2D geocentric reference system. * @return the WGS 84 2D geocentric reference system. */ private static getWGS84_GeoCentric; /** * Get the WGS 84 2D geographic reference system. * @return the WGS 84 2D geographic reference system. */ private static getWGS84_3D; /** * Get the WGS 84 2D coordinate reference system. * @return the WGS 84 2D coordinate reference system. */ private static getWGS84_2D; /** * Is a conversion to and from the WGS 84 coordinate system possible? * @return true if possible. */ isWGSCompatible(): boolean; /** * Convert a coordinate to the WGS 84 (geographic 2D) coordinate system. * @param source the coordinates in this CRS. * @param wgsTransformationIndex the index of the WGS transformation to use (negative for the default transformation). * @return the WGS 84 coordinate, x is longitude(-180..+180), y is latitude(-90..+90) and z is height (the z height is the same as the local height). */ toWGSi(source: Coordinate, wgsTransformationIndex: int32): Coordinate; /** * Convert a coordinate to the WGS 84 (geographic 2D) coordinate system. * @param source the coordinates in this CRS. * @return the WGS 84 coordinate, x is longitude(-180..+180), y is latitude(-90..+90) and z is height (the z height is the same as the local height). */ toWGS(source: Coordinate): Coordinate; /** * Convert from the WGS 84 (geographic 2D) coordinate system to this coordinate system. * @param source the coordinates in the WGS 84 coordinate system, where x is longitude(-180..+180), y is latitude(-90..+90) and z is height. * @param wgsTransformationIndex the index of the WGS transformation to use (negative for the default transformation). * @return the coordinates in this CRS (the z height is the same as the WGS height). */ fromWGSi(source: Coordinate, wgsTransformationIndex: int32): Coordinate; /** * Convert from the WGS 84 (geographic 2D) coordinate system to this coordinate system. * @param source the coordinates in the WGS 84 coordinate system, where x is longitude(-180..+180), y is latitude(-90..+90) and z is height. * @return the coordinates in this CRS (the z height is the same as the WGS height). */ fromWGS(source: Coordinate): Coordinate; /** * Check if another CRS is compatible with this one. * @param other the other CRS. * @return true if compatible. */ isCompatible(other: CRS): boolean; /** * Check if two CRSs are compatible. * @param crs1 the first CRS. * @param crs2 the second CRS. * @return true if compatible. */ static areCompatible(crs1: CRS, crs2: CRS): boolean; /** * Get the text form of the CRS. * @return the text form of the CRS. */ getTextForm(): string; /** * Set the text form of the CRS. * @param textForm the text form of the CRS. */ setTextForm(textForm: string): void; /** * Get the access time. * @return the access time. */ getAccessTime(): float64; /** * Set the access time. * @param time the access time. */ setAccessTime(time: float64): void; /** * The standard toString method. * @see Object#toString */ toString(): string; /** * Get the type of a CRS. * @param crsKind the type of CRS. * @return a parsed type. */ static parseCRSType(crsKind: string): int32; /** * Get the label of a type of a CRS. * @param crsType the type of CRS. * @return a label. */ static labelCRSType(crsType: int32): string; } export {}; //# sourceMappingURL=CRS.d.ts.map