Reference Source
public class | source

ProjectionTransform

ProjectionTransform is a class to transform point coordinates from one coordinate system to another

Constructor Summary

Public Constructor
public

constructor(sourProjection: String, destProjection: String)

constructor

Method Summary

Public Methods
public

setSourProjection(sourProjection: String): *

set source projection

public

setdestProjection(destProjection: String): *

set dest projection

public

transformForward(coordinates: Array | Object): Array

coordinate transformation forward

public

transfromInverse(coordinates: Array | Object): Array

coordinate transformation inverse

Public Constructors

public constructor(sourProjection: String, destProjection: String) source

constructor

Params:

NameTypeAttributeDescription
sourProjection String

source projection(projections can be proj or wkt strings).

destProjection String

dest projection(projections can be proj or wkt strings).

Public Methods

public setSourProjection(sourProjection: String): * source

set source projection

Params:

NameTypeAttributeDescription
sourProjection String

source projection(projections can be proj or wkt strings).

Return:

*

none

public setdestProjection(destProjection: String): * source

set dest projection

Params:

NameTypeAttributeDescription
destProjection String

dest projection(projections can be proj or wkt strings).

Return:

*

none

public transformForward(coordinates: Array | Object): Array source

coordinate transformation forward

Params:

NameTypeAttributeDescription
coordinates Array | Object

before transform(coordinates may an object of the form {x:x,y:y} or an array of the form [x,y])

Return:

Array

coordinate after transform(an array of the form [x,y]).

public transfromInverse(coordinates: Array | Object): Array source

coordinate transformation inverse

Params:

NameTypeAttributeDescription
coordinates Array | Object

before transform(coordinates may an object of the form {x:x,y:y} or an array of the form [x,y])

Return:

Array

coordinate after transform(an array of the form [x,y]).