Reference Source
public class | source

ProjectionTransform

坐标转换类(将坐标从一种投影转换到另一种投影)

Constructor Summary

Public Constructor
public

constructor(sourProjection: String, destProjection: String)

构造函数

Method Summary

Public Methods
public

setDestProjection(destProjection: String): *

设置目标投影

public

setSourProjection(sourProjection: String): *

设置原始投影

public

transformForward(coordinates: Array | Object): Array

坐标转换

public

transfromInverse(coordinates: Array | Object): Array

坐标反转

Public Constructors

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

构造函数

Params:

NameTypeAttributeDescription
sourProjection String

原始投影(投影可以是proj或wkt格式的字符串)

destProjection String

目标投影(投影可以是proj或wkt格式的字符串)

Public Methods

public setDestProjection(destProjection: String): * source

设置目标投影

Params:

NameTypeAttributeDescription
destProjection String

目标投影(投影可以是proj或wkt格式的字符串)

Return:

*

none

public setSourProjection(sourProjection: String): * source

设置原始投影

Params:

NameTypeAttributeDescription
sourProjection String

原始投影(投影可以是proj或wkt格式的字符串)

Return:

*

none

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

坐标转换

Params:

NameTypeAttributeDescription
coordinates Array | Object

原始投影的坐标(格式:{x:x,y:y}或[x,y])

Return:

Array

目标投影的坐标(格式:[x,y])

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

坐标反转

Params:

NameTypeAttributeDescription
coordinates Array | Object

目标投影的坐标(格式:{x:x,y:y}或[x,y])

Return:

Array

原始投影的坐标(格式:[x,y])