Skip to main content

Interface: MutableGeoProjection

A mutable geographic projection.

Hierarchy

Methods

copyParametersFrom

copyParametersFrom(other): this

Copies all projection parameters from another projection. The parameters copied are: center, pre-projection rotation angles, scale factor, post-projection translation, post-projection rotation angle, and reflectY.

Parameters

NameTypeDescription
otherGeoProjectionThe projection from which to copy parameters.

Returns

this

This projection, after it has been changed.

Defined in

src/sdk/geo/GeoProjection.ts:143


getCenter

getCenter(): GeoPointReadOnly

Gets the geographic center of this projection.

Returns

GeoPointReadOnly

The geographic center of this projection.

Inherited from

GeoProjection.getCenter

Defined in

src/sdk/geo/GeoProjection.ts:15


getPostRotation

getPostRotation(): number

Gets the post-projection (planar) rotation angle of this projection in radians.

Returns

number

The post-projection rotation angle of this projection.

Inherited from

GeoProjection.getPostRotation

Defined in

src/sdk/geo/GeoProjection.ts:50


getPreRotation

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

Gets the pre-projection (spherical) rotation of this projection as a vector [lambda, phi, gamma]. The rotation angles are expressed in radians. The full rotation is an intrinsic rotation with angles applied in the order lambda, phi, gamma. The rotation uses the standard geographic cartesian coordinate system, a right-handed coordinate system with the origin at the center of the earth, the positive x axis passing through 0 degrees N, 0 degrees E, and the positive z axis passing through the North Pole.

  • lambda: Intrinsic rotation angle about the z axis. Positive rotation is in the counterclockwise direction when looking down from above the axis.
  • phi: Intrinsic rotation angle about the y axis. Positive rotation is in the clockwise direction when looking down from above the axis.
  • gamma: Intrinsic rotation angle about the x axis. Positive rotation is in the counterclockwise direction when looking down from above the axis.

Returns

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

The pre-projection rotation of this projection.

Inherited from

GeoProjection.getPreRotation

Defined in

src/sdk/geo/GeoProjection.ts:38


getReflectY

getReflectY(): boolean

Checks whether this projection reflects the projected coordinate system across the x-axis.

Returns

boolean

Whether this projection reflects the projected coordinate system across the x-axis.

Inherited from

GeoProjection.getReflectY

Defined in

src/sdk/geo/GeoProjection.ts:56


getScaleFactor

getScaleFactor(): number

Gets the nominal scale factor of this projection. At a scale factor of 1, a distance of one great-arc radian will be projected to a distance of one pixel.

Returns

number

The nominal scale factor of this projection.

Inherited from

GeoProjection.getScaleFactor

Defined in

src/sdk/geo/GeoProjection.ts:22


getTranslation

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

Gets the post-projection (planar) translation of this projection, in pixels.

Returns

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

The post-projection translation of this projection.

Inherited from

GeoProjection.getTranslation

Defined in

src/sdk/geo/GeoProjection.ts:44


invert

invert<T>(vec, out): T

Inverts a set of projected coordinates. This method will determine the geographic point whose projected location is the equal to that described by a 2D position vector.

Type parameters

NameType
Textends Float64Array | GeoPoint

Parameters

NameTypeDescription
vecReadonly<Omit<Float64Array, "set" | "sort" | "copyWithin">>The 2D position vector describing the location of the projected coordinates.
outTThe point to which to write the result.

Returns

T

the inverted point.

Inherited from

GeoProjection.invert

Defined in

src/sdk/geo/GeoProjection.ts:73


project

project(point, out): Float64Array

Projects a set of lat/lon coordinates.

Parameters

NameTypeDescription
pointReadonly<Omit<Float64Array, "set" | "sort" | "copyWithin">> | LatLonInterfaceThe point to project, as either a LatLonInterface or a [lon, lat] array.
outFloat64ArrayThe vector to which to write the result.

Returns

Float64Array

The projected point, as a vector.

Inherited from

GeoProjection.project

Defined in

src/sdk/geo/GeoProjection.ts:64


setCenter

setCenter(point): this

Sets the geographic center of this projection. The center point of the projection is projected to the origin, before any post-projection transformations are applied.

Parameters

NameTypeDescription
pointLatLonInterfaceThe new center point.

Returns

this

This projection, after it has been changed.

Defined in

src/sdk/geo/GeoProjection.ts:86


setPostRotation

setPostRotation(rotation): this

Sets the post-projection (planar) rotation of this projection.

Parameters

NameTypeDescription
rotationnumberThe new post-projection rotation angle, in radians.

Returns

this

This projection, after it has been changed.

Defined in

src/sdk/geo/GeoProjection.ts:126


setPreRotation

setPreRotation(vec): this

Sets the pre-projection (spherical) rotation of this projection as a vector [lambda, phi, gamma]. The full rotation is an intrinsic rotation with angles applied in the order lambda, phi, gamma. The rotation uses the standard geographic cartesian coordinate system, a right-handed coordinate system with the origin at the center of the earth, the positive x axis passing through 0 degrees N, 0 degrees E, and the z axis passing through the North Pole.

  • lambda: Intrinsic rotation angle about the z axis. Positive rotation is in the counterclockwise direction when looking down from above the axis.
  • phi: Intrinsic rotation angle about the y axis. Positive rotation is in the clockwise direction when looking down from above the axis.
  • gamma: Intrinsic rotation angle about the x axis. Positive rotation is in the counterclockwise direction when looking down from above the axis.

Parameters

NameTypeDescription
vecReadonly<Omit<Float64Array, "set" | "sort" | "copyWithin">>The pre-projection rotation, as a vector [lambda, phi, gamma]. The rotation angles should be expressed in radians.

Returns

this

This projection, after it has been changed.

Defined in

src/sdk/geo/GeoProjection.ts:112


setReflectY

setReflectY(val): this

Sets whether this reflection should reflect the projected coordinate system across the x-axis. Setting this value to true is useful in the situation where the projected coordinate system should use a positive-y-axis-down convention.

Parameters

NameTypeDescription
valbooleanTrue if reflection is desired, false otherwise.

Returns

this

This projection, after it has been changed.

Defined in

src/sdk/geo/GeoProjection.ts:135


setScaleFactor

setScaleFactor(factor): this

Sets the nominal scale factor of this projection. At a scale factor of 1, a distance of one great-arc radian will be projected to a distance of one pixel.

Parameters

NameTypeDescription
factornumberThe new nominal scale factor.

Returns

this

This projection, after it has been changed.

Defined in

src/sdk/geo/GeoProjection.ts:94


setTranslation

setTranslation(vec): this

Sets the post-projection (planar) translation of this projection.

Parameters

NameTypeDescription
vecReadonly<Omit<Float64Array, "set" | "sort" | "copyWithin">>The new post-projection translation, in pixels.

Returns

this

This projection, after it has been changed.

Defined in

src/sdk/geo/GeoProjection.ts:119