MeasurementLengthGround

지면 거리 계산 및 영역 표시 클래스.
Ground distance calculation and area display class.

new Ditap.MeasurementLengthGround(options)

Name Type Description
options object 아래 속성 포함 객체.
Object with the following properties:
Name Type Default Description
viewer DitapViewer 사용할 Ditap Viewer 인스턴스.
The DitapViewer instance to use.
positions Array.<Cartesian3> optional 지면 거리 측정을 위한 Cartesian 좌표 배열.
Cartesian coordinate array for measuring ground distances.
※ 주의사항(Note).
지형모델이 Ellipsoid(구형)인 경우, 생성자 함수에 측정 위치 입력으로 인스턴스 생성 가능.
When the terrain model is Ellipsoid, it is possible to create an instance by providing a measurement location as input to the constructor function.
지형모델이 Terrain(실제 지형)인 경우 생성자 함수에 측정 위치 입력으로 인스턴스 생성 불가하며, InteractionLengthGround를 통해 실제 지형 모델 상에 생성해야함.
When the terrain model is Terrain, it is not possible to create an instance by providing a measurement location as input to the constructor function.
Instead, it must be placed on the actual terrain model using InteractionLengthGround.
labelOption String "total" optional 지면 거리 측정 완료 후 라벨 표시 옵션. 지정하지 않은 경우 개별 표시.
"total" : 폴리라인 전체 길이 표시.
"single" : 폴리라인 개별 길이 표시.

Label display option after completing the ground distance measurement. If not specified, display individually.
"total" : Labels displaying the full length of the polyline.
"single" : Labels showing the length for each polyline.
lerpCount number optional 포인트와 포인트 사이의 선형 보간할 개수(1~100). 지정하지 않은 경우 두 점 사이의 간격에 따라 선형 보간 계산(권장). (10m 이내: 50cm 간격, 100m 이내: 1m 간격, 1000m 이내: 10m 간격, 그 이상은 100m 간격)
The number of points to linearly interpolate between two(1 to 100). If not specified, linear interpolation is calculated automatically(recommended). (Within 10m: 50cm intervals, within 100m: 1m intervals, within 1000m: 10m intervals, beyond that: 100m intervals)
entityColor Color Color.fromBytes(255, 115, 0, 255) optional 엔티티 색상.
Color of the entity.
Example:
// 샌드캐슬 예제 'DiTAP - Ground Length Measurement' 참조

const viewer = new Ditap.DitapViewer("ditapContainer");

// 1. 지정된 영역 생성. (InteractionLengthGround를 통한 수정 불가.)
// ※ 주의사항(Note). 
// - 지형모델이 Ellipsoid(구형)인 경우, 생성자 함수에 측정 위치 입력으로 인스턴스 생성 가능.
// - When the terrain model is Ellipsoid, it is possible to create an instance by providing a measurement location as input to the constructor function.
// - 지형모델이 Terrain(실제 지형)인 경우 생성자 함수에 측정 위치 입력으로 인스턴스 생성 불가하며, InteractionLengthGround를 통해 실제 지형 모델 상에 생성해야함.
// - When the terrain model is Terrain (real terrain), it is not possible to create an instance by providing a measurement location as input to the constructor function.
// Instead, it must be placed on the actual terrain model using InteractionLengthGround.

const position1 = new Ditap.Cartesian3(
    -3044770.8581131194,
    4043787.775061581,
    3867425.490573394
);
const position2 = new Ditap.Cartesian3(
     -3044776.871333837,
     4043767.978344368,
     3867441.348968651
);
const position3 = new Ditap.Cartesian3(
     -3044797.958027237,
     4043766.8311267258,
     3867426.050280055
);
const positions = [position1, position2, position3];

const options = {
 viewer: viewer,
 positions: positions,
 labelOption: "total",
 lerpCount: 10,
 entityColor: Color.fromBytes(255, 115, 0, 255)
};

const measurementLengthGround = new Ditap.MeasurementLengthGround(options);

// 2. 마우스로 영역 지정 후 생성. (InteractionLengthGround를 통해 지면 거리 측정 및 영역 표시.)
const measurementLengthGround = new Ditap.MeasurementLengthGround({
 viewer: viewer
});

const interactionLengthGround = new Ditap.InteractionLengthGround();
interactionLengthGround.measurementLengthGround = measurementLengthGround;

Members

entityColor

엔티티 색상.
Color of the entity.

isLabelOption : string

지면 길이 측정 후 표시할 라벨 옵션.
"total" : 폴리라인 전체 길이 표시.
"single" : 폴리라인 개별 길이 표시.

Options for labels to be displayed after ground length measurements.
"total" : Labels displaying the full length of the polyline.
"single" : Labels showing the length for each polyline.

※ 주의사항(Note).
측정을 시작하기 전에 옵션 값을 변경하여야 반영. 측정이 완료된 경우 옵션 값 변경 시 반영되지 않음.
Options must be changed before starting the measurement to take effect. Changes to options are not reflected once the measurement is completed.

labelPositions : Array.<Cartesian3>

라벨 엔티티 위치.
Label Entity Positions

readonly length : number

측정된 지면 거리 값.
Measured ground length value.

lerpCount : number|undefined

포인트와 포인트 사이의 선형 보간할 개수(1~100). 자동으로 계산되기를 원하면 undefined 입력.
The number of linear interpolations between points (1 to 100). If you want it to be automatically calculated, enter undefined.

※ 주의사항(Note).
측정을 시작하기 전에 변경하여야 반영. 측정이 완료된 경우 반영되지 않음.
Changes must be made before starting the measurement to take effect. They will not be reflected once the measurement is completed.

readonly pointEntities : Array.<Entity>

지면 거리 측정으로 얻은 Point Entity 배열.
Array of point entities resulting from ground length measurements.

readonly polylineEntities : Array.<Entity>

지면 거리 측정으로 얻은 Polyline Entity 배열.
Array of polyline entities resulting from ground length measurements.

readonly positions : Array.<Cartesian3>

지면 거리 측정 할 Cartesian 배열
Cartesian array for measuring ground distances.

viewer : DitapViewer

사용할 Ditap Viewer 인스턴스.
The DitapViewer instance to use.

Methods

destroy()

인스턴스 파괴. 영구적으로 제거하는 경우 호출.
Destroys the instance. Should be called if permanently removing the instance from layout.