UNPKG

@itwin/core-common

Version:

iTwin.js components common to frontend and backend

252 lines • 13 kB
/** @packageDocumentation * @module Geometry */ /** This enum contains the list of all projection methods that can be represented as part of the HorizontalCRS * class. The None method indicates there is no projection and thus the CRS is longitude/latitude based * with units as degrees. * All other projection indicated a projected CRS. * @public * @extensions */ export type ProjectionMethod = "None" | "TransverseMercator" | "SouthOrientedTransverseMercator" | "TransverseMercatorWisconsin" | "TransverseMercatorMinnesota" | "TransverseMercatorAffine" | "MercatorStandardParallel" | "Mercator" | "UniversalTransverseMercator" | "LambertConformalConicTwoParallels" | "LambertConformalConicBelgium" | "LambertConformalConicAffine" | "LambertConformalConicWisconsin" | "LambertConformalConicMinnesota" | "LambertConformalConicMichigan" | "LambertConformalConicOneParallel" | "AlbersEqualArea" | "NewZealandNationalGrid" | "ObliqueMercator1" | "ObliqueMercator2" | "TransverseMercatorOSTN97" | "TransverseMercatorOSTN02" | "TransverseMercatorOSTN15" | "Krovak" | "KrovakModified" | "ObliqueCylindricalSwiss" | "TransverseMercatorDenmarkSystem34" | "TransverseMercatorDenmarkSystem3499" | "TransverseMercatorDenmarkSystem3401" | "Cassini" | "Sinusoidal" | "VanDerGrinten" | "Bonne" | "Mollweide" | "EckertIV" | "EckertVI" | "GoodeHomolosine" | "Robinson" | "PlateCarree" | "MillerCylindrical" | "WinkelTripel" | "AzimuthalEqualArea" | "ObliqueStereographic" | "RectifiedSkewOrthomorphicCentered" | "RectifiedSkewOrthomorphicOrigin" | "ObliqueCylindricalHungary" | "Orthographic" | "AmericanPolyconic" | "LambertEquidistantAzimuthal" | "ObliqueMercatorMinnesota"; /** The equations are: * X1 = a1*X + a2*Y + TranslationX * Y1 = b1*X + b2*Y + translationY * An affine representing no transformation will have: a1 = 1.0, a2 = 0.0, b1 = 0.0, b2 = 1.0. * @public * @extensions */ export interface AffineTransformProps { /** The X post translation */ translationX: number; /** The Y post-translation */ translationY: number; /** A1 value as defined in global comment. */ a1: number; /** B1 value as defined in global comment. */ b1: number; /** A2 value as defined in global comment. */ a2: number; /** B2 value as defined in global comment. */ b2: number; } /** The equations are: * X1 = a1*X + a2*Y + TranslationX * Y1 = b1*X + b2*Y + translationY * An affine representing no transformation will have: a1 = 1.0, a2 = 0.0, b1 = 0.0, b2 = 1.0. * @public */ export declare class AffineTransform implements AffineTransformProps { /** The X post translation */ readonly translationX: number; /** The Y post-translation */ readonly translationY: number; /** A1 value as defined in global comment. */ readonly a1: number; /** B1 value as defined in global comment. */ readonly b1: number; /** A2 value as defined in global comment. */ readonly a2: number; /** B2 value as defined in global comment. */ readonly b2: number; constructor(data?: AffineTransformProps); /** Creates an Affine Transform from JSON representation. * @public */ static fromJSON(data: AffineTransformProps): AffineTransform; /** Creates a JSON from the Affine Transform definition * @public */ toJSON(): AffineTransformProps; /** Compares two Affine Transforms. It applies a minuscule tolerance for number compares * @public */ equals(other: AffineTransform): boolean; } /** Type used in the definition of UTM Zoning projection. This projection only requires a zone number and * the hemisphere North or South. * @public * @extensions */ export type HemisphereEnum = "South" | "North"; /** The type to define the three zones of the Danish System 34 projections. * @public * @extensions */ export type DanishSystem34Region = "Jylland" | "Sjaelland" | "Bornholm"; /** This class encapsulates the projection of the CRS. The projection relies on a projection method * and a set of projection parameters specific to projection method selected. * @public * @extensions */ export interface ProjectionProps { /** The projection method. */ method: ProjectionMethod; /** The False Easting of the projection. */ falseEasting?: number; /** The False Northing of the projection. */ falseNorthing?: number; /** The Central Meridian. */ centralMeridian?: number; /** The latitude of origin of the projection. */ latitudeOfOrigin?: number; /** Longitude of origin of the projection. */ longitudeOfOrigin?: number; /** The scale reduction factor applied at origin. The nature of the projection has a * inherent scale factor applied that gradually varies outward from the projection origin. * The scale factor at origin enables to level the inherent scale factor over an use extent. * For the michigan variation of the Lambert Conformal Conic projection it * can be used instead or in addition to Standard Parallel to define * a scale factor. */ scaleFactor?: number; /** The elevation of the origin of the projection above the geoid. This value * allows compensation for the scale factor related to elevation above the sea level. */ elevationAboveGeoid?: number; /** The geoid separation. It represents the elevation of the geoid above the ellipsoid at the center of the projection. */ geoidSeparation?: number; /** The definition of the affine post-transformation for Transverse Mercator and Lambert Conformal Conic with post-affine projections */ affine?: AffineTransformProps; /** Standard parallel for projection that only use one. * For cylindrical projections (mercator, transverse mercator ...) it defines the parallel at * which the cylinder crosses the ellipsoid resulting in a scale factor being applied. * For conic projections (Lambert Tangential ...) it defines * the standard parallel at which the cone is tangent to the ellipsoid. */ standardParallel?: number; /** The first standard parallel at which the cone crosses the ellipsoid. */ standardParallel1?: number; /** The second standard parallel at which the cone crosses the ellipsoid. */ standardParallel2?: number; /** The UTM zone number. A number from 0 to 60. */ zoneNumber?: number; /** The hemisphere for Universal Transverse Mercator projection. */ hemisphere?: HemisphereEnum; /** Longitude of the central point. */ centralPointLongitude?: number; /** Latitude of the central point. */ centralPointLatitude?: number; /** Longitude of the first alignment point for some Oblique Mercator and Krovak projections. */ point1Longitude?: number; /** Latitude of the first alignment point for some Oblique Mercator and Krovak projections. */ point1Latitude?: number; /** Longitude of the second alignment point for some Oblique Mercator projections. */ point2Longitude?: number; /** Latitude of the second alignment point for some Oblique Mercator projections. */ point2Latitude?: number; /** The Danish zone for Danish projections. */ danishSystem34Region?: DanishSystem34Region; /** Azimuth. */ azimuth?: number; } /** This class encapsulates the projection of the CRS. The projection relies on a projection method and a set * of projection parameters specific to projection method selected to flatten the surface of the model of the Earth * defines as a geodetic ellipsoid. The flattening and the distortion angular, linear, scale from the process varies between methods. * Refer to appropriate external documentation for details. * @note Various property sets are required for specific projection methods. The current class implementation does not enforce * these rules yet and it is possible to define or not define any property regardless the method used. * @public */ export declare class Projection implements ProjectionProps { /** The projection method. */ readonly method: ProjectionMethod; /** The False Easting of the projection. */ readonly falseEasting?: number; /** The False Northing of the projection. */ readonly falseNorthing?: number; /** The Central Meridian. */ readonly centralMeridian?: number; /** The latitude of origin of the projection. */ readonly latitudeOfOrigin?: number; /** Longitude of origin of the projection. */ readonly longitudeOfOrigin?: number; /** The scale reduction factor applied at origin. The nature of the projection has a * inherent scale factor applied that gradually varies outward from the projection origin. * The scale factor at origin enables to level the inherent scale factor over an use extent. * For the michigan variation of the Lambert Conformal Conic projection it * can be used instead or in addition to Standard Parallel to define * a scale factor. */ readonly scaleFactor?: number; /** The elevation of the origin of the projection above the geoid. This value * allows compensation for the scale factor related to elevation above the sea level. */ readonly elevationAboveGeoid?: number; /** The geoid separation. It represents the elevation of the geoid above the ellipsoid at the center of the projection. */ readonly geoidSeparation?: number; /** The definition of the affine post-transformation for Transverse Mercator and Lambert Conformal Conic with post-affine projections */ readonly affine?: AffineTransform; /** Standard parallel for projection that only use one. * For cylindrical projections (mercator, transverse mercator ...) it defines the parallel at ** which the cylinder crosses the ellipsoid resulting in a scale factor being applied. * For conic projections (Lambert Tangential ...) it defines * the standard parallel at which the cone is tangent to the ellipsoid. */ readonly standardParallel?: number; /** The first standard parallel at which the cone crosses the ellipsoid. */ readonly standardParallel1?: number; /** The second standard parallel at which the cone crosses the ellipsoid. */ readonly standardParallel2?: number; /** The UTM zone number. A number from 0 to 60. */ readonly zoneNumber?: number; /** The hemisphere for Universal Transverse Mercator projection. */ readonly hemisphere?: HemisphereEnum; /** Longitude of the central point. */ readonly centralPointLongitude?: number; /** Latitude of the central point. */ readonly centralPointLatitude?: number; /** Longitude of the first alignment point for some Oblique Mercator and Krovak projections. */ readonly point1Longitude?: number; /** Latitude of the first alignment point for some Oblique Mercator and Krovak projections. */ readonly point1Latitude?: number; /** Longitude of the second alignment point for some Oblique Mercator projections. */ readonly point2Longitude?: number; /** Latitude of the second alignment point for some Oblique Mercator projections. */ readonly point2Latitude?: number; /** The Danish zone for Danish projections. */ readonly danishSystem34Region?: DanishSystem34Region; /** Azimuth. */ readonly azimuth?: number; constructor(_data?: ProjectionProps); /** Creates a Projection from JSON representation. * @public */ static fromJSON(data: ProjectionProps): Projection; /** Creates a JSON from the Projection definition * @public */ toJSON(): ProjectionProps; /** Compares two projections. It is a strict compare operation as descriptive data is compared * but a minuscule tolerance is applied to number compares. * @public */ equals(other: Projection): boolean; } /** A 2D cartographic point in degrees * @public * @extensions */ export interface Carto2DDegreesProps { /** Latitude value in degrees */ latitude: number; /** Longitude value in degrees */ longitude: number; } /** A 2D cartographic point in degrees * @public */ export declare class Carto2DDegrees implements Carto2DDegreesProps { /** Latitude value in degrees. Must be between -90 and +90 included */ private _latitude; /** Returns or sets the latitude in degrees. When setting the provided number must be between or equal from -90 to 90. */ get latitude(): number; set latitude(newLatitude: number); /** Longitude value in degrees */ longitude: number; constructor(data?: Carto2DDegreesProps); /** Creates a Carto2DDegrees object from JSON representation. * @public */ static fromJSON(data: Carto2DDegreesProps): Carto2DDegrees; /** Creates a JSON from the Carto2DDegrees definition * @public */ toJSON(): Carto2DDegreesProps; /** Compares two Carto2DDegrees object. It applies a minuscule tolerance to compares. * @public */ equals(other: Carto2DDegrees): boolean; } //# sourceMappingURL=Projection.d.ts.map