• 점과 선 사이의 가장 가까운 거리를 측정하는 함수입니다.

    Parameters

    • line: Feature<LineString | MultiLineString, {
          [name: string]: any;
      }> | LineString | MultiLineString

      측정할 LineString Feature 입니다.

    • point: PointGeo | Feature<Point, {
          [name: string]: any;
      }>

      측정할 Point Feature 입니다.

    • Optional options: {
          units?: Unit;
      }

      길이 측정에 사용할 단위입니다.

      • Optional units?: Unit

    Returns Feature<Point, {
        [name: string]: any;
    }>

    반환되는 Point Feature에는 다음과 같은 속성값이 포함됩니다.

    • index : 가장 가까운 점이 발견된
    • dist : 가장 가까운 점과 선 사이의 거리
    • location: 선의 시작점과 가장 가까운 점까지의 거리

    Example

    const line: ktGms.geometry.LineString = new ktGms.geometry.LineString(
    [
    [127.02222, 37.49144],
    [127.015522, 37.49044],
    [127.015522, 37.49294],
    ],
    {}
    );
    const point: ktGms.geometry.PointGeo = new ktGms.geometry.PointGeo([127.019, 37.493], {});
    const nearestPoint = analysis.miscellaneous.nearestPointOnLine(line, point, { units: "kilometers" });

    See

    Calculate a nearest point on line 점과 선 사이의 거리를 측정하는 예제

Generated using TypeDoc