xtorcga
Version:
Xtor Compute Geometry Algorithm Libary 计算几何算法库
46 lines (45 loc) • 1.83 kB
TypeScript
import { Cartographic } from "./Cartographic";
/**
* A two dimensional region specified as longitude and latitude coordinates.
*
* @alias Rectangle
* @constructor
*
* @param {Number} [west=0.0] The westernmost longitude, in radians, in the range [-Pi, Pi].
* @param {Number} [south=0.0] The southernmost latitude, in radians, in the range [-Pi/2, Pi/2].
* @param {Number} [east=0.0] The easternmost longitude, in radians, in the range [-Pi, Pi].
* @param {Number} [north=0.0] The northernmost latitude, in radians, in the range [-Pi/2, Pi/2].
*
* @see Packable
*/
export declare class Rectangle {
west: number;
south: number;
east: number;
north: number;
constructor(west?: number, south?: number, east?: number, north?: number);
/**
* 计算宽度 单位弧度
*/
static computeWidth: (rectangle: Rectangle) => number;
/**
* 计算高度弧度
*/
static computeHeight: (rectangle: Rectangle) => number;
static fromDegrees(west?: number, south?: number, east?: number, north?: number, result?: Rectangle): Rectangle;
static fromRadians(west?: number, south?: number, east?: number, north?: number, result?: Rectangle): Rectangle;
get width(): number;
get height(): number;
/**
* Computes the northeast corner of a rectangle.
*
* @param {Rectangle} rectangle The rectangle for which to find the corner
* @param {Cartographic} [result] The object onto which to store the result.
* @returns {Cartographic} The modified result parameter or a new Cartographic instance if none was provided.
*/
northeast(result?: Cartographic): Cartographic;
/**
* Computes the southeast corner of a rectangle.
*/
southeast(result?: Cartographic): Cartographic;
}