EarthSDK
    正在准备搜索索引...

    函数 geoNearestPointOnLine

    • 获取点在线上最近的点

      参数

      • l: (ESJVector3D | ESJVector2D)[]

        线的点数组,数组元素可以是二维向量(ESJVector2D)或三维向量(ESJVector3D)。

      • p: ESJVector3D | ESJVector2D

        待计算的点,可以是二维向量(ESJVector2D)或三维向量(ESJVector3D)。

      返回 {
          geometry: { coordinates: ESJVector3D; type: "Point" };
          properties: { dist: number; index: number; location: number };
          type: "Feature";
      }

      包含最近点信息的对象,其结构如下: - geometry: { type: 'Point', coordinates: ESJVector3D },表示最近点的几何信息,包含点的类型和坐标。 - properties: { dist: number, index: number, location: number },包含最近点的相关属性,如距离、索引和位置。 - type: "Feature",表示对象的类型为特征。