Skip to main content

Class: MercatorProjection

A Mercator projection.

Hierarchy

  • AbstractGeoProjection

    MercatorProjection

Constructors

constructor

new MercatorProjection(): MercatorProjection

Returns

MercatorProjection

Inherited from

AbstractGeoProjection.constructor

Properties

center

Protected Readonly center: GeoPoint

Inherited from

AbstractGeoProjection.center

Defined in

src/sdk/geo/GeoProjection.ts:155


centerTranslation

Protected Readonly centerTranslation: Float64Array

Inherited from

AbstractGeoProjection.centerTranslation

Defined in

src/sdk/geo/GeoProjection.ts:156


postRotation

Protected postRotation: number = 0

Inherited from

AbstractGeoProjection.postRotation

Defined in

src/sdk/geo/GeoProjection.ts:160


preRotation

Protected Readonly preRotation: Float64Array

Inherited from

AbstractGeoProjection.preRotation

Defined in

src/sdk/geo/GeoProjection.ts:158


preRotationForwardTransform

Protected Readonly preRotationForwardTransform: Transform3D

Inherited from

AbstractGeoProjection.preRotationForwardTransform

Defined in

src/sdk/geo/GeoProjection.ts:165


preRotationReverseTransform

Protected Readonly preRotationReverseTransform: Transform3D

Inherited from

AbstractGeoProjection.preRotationReverseTransform

Defined in

src/sdk/geo/GeoProjection.ts:166


reflectY

Protected reflectY: number = 1

Inherited from

AbstractGeoProjection.reflectY

Defined in

src/sdk/geo/GeoProjection.ts:163


rotationCos

Protected rotationCos: number = 1

Inherited from

AbstractGeoProjection.rotationCos

Defined in

src/sdk/geo/GeoProjection.ts:162


rotationSin

Protected rotationSin: number = 0

Inherited from

AbstractGeoProjection.rotationSin

Defined in

src/sdk/geo/GeoProjection.ts:161


scaleFactor

Protected scaleFactor: number

Inherited from

AbstractGeoProjection.scaleFactor

Defined in

src/sdk/geo/GeoProjection.ts:157


translation

Protected Readonly translation: Float64Array

Inherited from

AbstractGeoProjection.translation

Defined in

src/sdk/geo/GeoProjection.ts:159

Methods

copyParametersFrom

copyParametersFrom(other): this

Parameters

NameType
otherGeoProjection

Returns

this

Inherit Doc

Inherited from

AbstractGeoProjection.copyParametersFrom

Defined in

src/sdk/geo/GeoProjection.ts:242


getCenter

getCenter(): GeoPointReadOnly

Returns

GeoPointReadOnly

Inherit Doc

Inherited from

AbstractGeoProjection.getCenter

Defined in

src/sdk/geo/GeoProjection.ts:171


getPostRotation

getPostRotation(): number

Returns

number

Inherit Doc

Inherited from

AbstractGeoProjection.getPostRotation

Defined in

src/sdk/geo/GeoProjection.ts:191


getPreRotation

getPreRotation(): Readonly<Omit<Float64Array, "set" | "sort" | "copyWithin">>

Returns

Readonly<Omit<Float64Array, "set" | "sort" | "copyWithin">>

Inherit Doc

Inherited from

AbstractGeoProjection.getPreRotation

Defined in

src/sdk/geo/GeoProjection.ts:181


getReflectY

getReflectY(): boolean

Returns

boolean

Inherit Doc

Inherited from

AbstractGeoProjection.getReflectY

Defined in

src/sdk/geo/GeoProjection.ts:196


getScaleFactor

getScaleFactor(): number

Returns

number

Inherit Doc

Inherited from

AbstractGeoProjection.getScaleFactor

Defined in

src/sdk/geo/GeoProjection.ts:176


getTranslation

getTranslation(): Readonly<Omit<Float64Array, "set" | "sort" | "copyWithin">>

Returns

Readonly<Omit<Float64Array, "set" | "sort" | "copyWithin">>

Inherit Doc

Inherited from

AbstractGeoProjection.getTranslation

Defined in

src/sdk/geo/GeoProjection.ts:186


invert

invert<T>(vec, out): T

Type parameters

NameType
Textends Float64Array | GeoPoint

Parameters

NameType
vecReadonly<Omit<Float64Array, "set" | "sort" | "copyWithin">>
outT

Returns

T

Inherit Doc

Inherited from

AbstractGeoProjection.invert

Defined in

src/sdk/geo/GeoProjection.ts:397


invertRaw

invertRaw(vec, out): Float64Array

Inverts a raw projection.

Parameters

NameTypeDescription
vecReadonly<Omit<Float64Array, "set" | "sort" | "copyWithin">>a 2D vector describing the projected point to invert.
outFloat64Arraya 2D vector to which to write the result.

Returns

Float64Array

the inverted point.

Overrides

AbstractGeoProjection.invertRaw

Defined in

src/sdk/geo/GeoProjection.ts:456


preRotateForward

preRotateForward(vec, out): Float64Array

Applies a forward rotation to a set of lat/lon coordinates using this projection's pre-projection rotation angles.

Parameters

NameTypeDescription
vecReadonly<Omit<Float64Array, "set" | "sort" | "copyWithin">>the lat/lon coordinates to rotate, as a vector ([long, lat]).
outFloat64Arraythe vector to which to write the result.

Returns

Float64Array

the rotated lat/lon coordinates.

Inherited from

AbstractGeoProjection.preRotateForward

Defined in

src/sdk/geo/GeoProjection.ts:299


preRotateReverse

preRotateReverse(vec, out): Float64Array

Applies a reverse rotation to a set of lat/lon coordinates using this projection's pre-projection rotation angles.

Parameters

NameTypeDescription
vecReadonly<Omit<Float64Array, "set" | "sort" | "copyWithin">>the lat/lon coordinates to rotate, as a vector ([long, lat]).
outFloat64Arraythe vector to which to write the result.

Returns

Float64Array

the rotated lat/lon coordinates.

Inherited from

AbstractGeoProjection.preRotateReverse

Defined in

src/sdk/geo/GeoProjection.ts:331


project

project(point, out): Float64Array

Parameters

NameType
pointReadonly<Omit<Float64Array, "set" | "sort" | "copyWithin">> | LatLonInterface
outFloat64Array

Returns

Float64Array

Inherit Doc

Inherited from

AbstractGeoProjection.project

Defined in

src/sdk/geo/GeoProjection.ts:361


projectRaw

projectRaw(vec, out): Float64Array

Applies a raw projection.

Parameters

NameTypeDescription
vecReadonly<Omit<Float64Array, "set" | "sort" | "copyWithin">>a [lon, lat] vector describing the geographic point to project.
outFloat64Arraya 2D vector to which to write the result.

Returns

Float64Array

the projected point.

Overrides

AbstractGeoProjection.projectRaw

Defined in

src/sdk/geo/GeoProjection.ts:444


setCenter

setCenter(point): this

Parameters

NameType
pointLatLonInterface

Returns

this

Inherit Doc

Inherited from

AbstractGeoProjection.setCenter

Defined in

src/sdk/geo/GeoProjection.ts:201


setPostRotation

setPostRotation(rotation): this

Parameters

NameType
rotationnumber

Returns

this

Inherit Doc

Inherited from

AbstractGeoProjection.setPostRotation

Defined in

src/sdk/geo/GeoProjection.ts:228


setPreRotation

setPreRotation(vec): this

Parameters

NameType
vecReadonly<Omit<Float64Array, "set" | "sort" | "copyWithin">>

Returns

this

Inherit Doc

Inherited from

AbstractGeoProjection.setPreRotation

Defined in

src/sdk/geo/GeoProjection.ts:214


setReflectY

setReflectY(val): this

Parameters

NameType
valboolean

Returns

this

Inherit Doc

Inherited from

AbstractGeoProjection.setReflectY

Defined in

src/sdk/geo/GeoProjection.ts:236


setScaleFactor

setScaleFactor(factor): this

Parameters

NameType
factornumber

Returns

this

Inherit Doc

Inherited from

AbstractGeoProjection.setScaleFactor

Defined in

src/sdk/geo/GeoProjection.ts:208


setTranslation

setTranslation(vec): this

Parameters

NameType
vecReadonly<Omit<Float64Array, "set" | "sort" | "copyWithin">>

Returns

this

Inherit Doc

Inherited from

AbstractGeoProjection.setTranslation

Defined in

src/sdk/geo/GeoProjection.ts:222


updateCenterTranslation

updateCenterTranslation(): void

Updates the translation vector to move the center of this projection to the origin.

Returns

void

Inherited from

AbstractGeoProjection.updateCenterTranslation

Defined in

src/sdk/geo/GeoProjection.ts:269


updatePreRotationTransforms

updatePreRotationTransforms(): void

Updates the pre-rotation transformation matrices.

Returns

void

Inherited from

AbstractGeoProjection.updatePreRotationTransforms

Defined in

src/sdk/geo/GeoProjection.ts:254