Keyboard shortcuts

Press ← or → to navigate between chapters

Press ? to show this help

Press Esc to hide this help

도형의 중심점

항목값
화면 이름Geometry centroid
식별자geometryCentroidV1
지원 실행 방식Batch, Streaming
범주지리공간 (Geospatial)
반환 자료형GeoPoint

지구를 구로 근사해 도형의 질량 중심을 계산합니다. 여러 차원의 도형이 섞여 있으면 가장 높은 차원만 사용하므로 점, 선과 다각형이 함께 있으면 다각형만 기여합니다. 좌표는 32비트 부동소수점 정밀도로 반올림합니다.

입력 인자

이름지정 여부자료형의미와 조건
Expression필수Expression<Geometry>유효한 GeoJSON 입력입니다.

입출력 예시

예시 1: 기본 동작

인자 값:

  • Expression: geometry
geometry출력
{"type":"Polygon","coordinates":[[[-1.0,-1.0],[1.0,-1.0],[1.0,1.0],[-1.0,1.0],[-1.0,-1.0]]]}{
 latitude: 0.0,
 longitude: 0.0,
}
{"type":"LineString","coordinates":[[30.0,0.0],[35.0,0.0],[50.0,0.0]]}{
 latitude: 0.0,
 longitude: 40.0,
}
{"type":"MultiPoint","coordinates":[[0.0,0.0],[0.0,1.0]]}{
 latitude: 0.5,
 longitude: 0.0,
}
{"type":"MultiPoint","coordinates":[[160.0,0.0],[-170.0,0.0]]}{
 latitude: 0.0,
 longitude: 175.0,
}
{"type":"GeometryCollection","geometries":[{"type":"Polygon","coordinates":[[[0.0,-0.017981],[0.0017...{
 latitude: 0.0,
 longitude: 0.0,
}
{"type":"Polygon","coordinates":[[[10.2010565854362,-45.0511905886321],[10.20108119607644,-45.051242...{
 latitude: -45.05131203645637,
 longitude: 10.200951037517806,
}
nullnull

긴 구조값 안의 줄임표는 생략한 내용을 나타냅니다.