Mixin: Common

projection.Common

Common Methods of Projections.

Static Methods

  • (static) project(p) [source]

  • Project a geographical coordinate to a projected coordinate (2d coordinate)
    Parameter Type Description
    p Coordinate coordinate to project
    Returns:
    Coordinate:
  • (static) unproject(p) [source]

  • Unproject a projected coordinate to a geographical coordinate (2d coordinate)
    Parameter Type Description
    p Coordinate coordinate to project
    Returns:
    Coordinate:
  • (static) projectCoords(coordinates) [source]

  • Project a group of geographical coordinates to projected coordinates.
    Parameter Type Description
    coordinates Array.<Coordinate> | Array.<Array.<Coordinate>> | Array.<Array.<Array.<Coordinate>>> coordinates to project
    Returns:
    Array.<Coordinate>|Array.<Array.<Coordinate>>|Array.<Array.<Array.<Coordinate>>>:
  • (static) unprojectCoords(projCoords) [source]

  • Unproject a group of projected coordinates to geographical coordinates.
    Parameter Type Description
    projCoords Array.<Coordinate> | Array.<Array.<Coordinate>> | Array.<Array.<Array.<Coordinate>>> projected coordinates to unproject
    Returns:
    Array.<Coordinate>|Array.<Array.<Coordinate>>|Array.<Array.<Array.<Coordinate>>>:
  • (static) isSphere() [source]

  • Whether the projection is spherical
    Returns:
    Boolean:
  • (static) isOutSphere(pcoord) [source]

  • If the projected coord out of the sphere
    Parameter Type Description
    pcoord Coordinate projected coord
    Returns:
    Boolean:
  • (static) wrapCoord(pcoord) [source]

  • Wrap the projected coord in the sphere
    Parameter Type Description
    pcoord Coordinate projected coord
    Returns:
    Coordinate: wrapped projected coord