import { List } from "../dataType/List";
import { Geometry } from "./Geometry";
/**
* Geometry
* @class Geometry.LineString
* @since gve.Geometry
*/
export class LineString extends Geometry {
/**
* 坐标点序列构造的线Geometry
* @hideconstructor
* @param {List<Geometry> | List<List<Number>> | List<Number>} [coords] 给定坐标系下的多个点构成的坐标序列
* @param {String} [proj] 可选参数,待转换的投影坐标
* @return Geometry.LineString
*/
constructor(coords: List<Geometry> | number[] | number[][] | number[][], proj?: string) {
let geojson = {
type: "LineString",
coordinates: coords,
};
super(geojson);
if (!(this instanceof LineString)) {
return new LineString(coords);
}
}
// /**
// * 添加一个LineString到图像.
// * @param {Image} image 输入图像
// * @param {Number|Null} borderValue 图像边界值默认为null
// * @param {Number} neighborhood -用于检测线边缘的邻域的大小。默认值为50。
// * @return {String} 指示操作是否成功的字符串。
// */
// addLineString(
// image: any,
// borderValue: Number | null,
// neighborhood: Number = 50
// ) {
// return "";
// }
// /**
// * 删除一个LineString.
// */
// removeLineString() {}
}