도형 단순화
| 항목 | 값 |
|---|---|
| 화면 이름 | Simplify geometry |
| 식별자 | simplifyGeometryV1 |
| 지원 실행 방식 | Batch, Faster, Streaming |
| 범주 | 지리공간 (Geospatial) |
| 반환 자료형 | Geometry |
지구를 구로 근사하여 허용 거리 안의 점을 제거하고 GeoJSON 도형을 단순화합니다. 허용 거리보다 작은 고리는 완전히 제거될 수 있습니다.
입력 인자
| 이름 | 지정 여부 | 자료형 | 의미와 조건 |
|---|---|---|---|
Geometry | 필수 | Expression<Geometry> | 유효한 GeoJSON 도형입니다. |
Tolerance | 필수 | Expression<Long> | 허용 거리이며 단위는 미터입니다. |
Coordinate precision | 선택 | Expression<Long> | 좌표의 최대 소수 자릿수입니다. 기본값은 6입니다. |
입출력 예시
예시 1: 기본 동작
인자 값:
Geometry:GeometryTolerance:ToleranceCoordinate precision: null
| Geometry | Tolerance | 출력 |
|---|---|---|
| {"type":"LineString","coordinates":[[30.0,0.0],[35.0,0.0],[40.0,0.0]]} | 1000 | {"type":"LineString","coordinates":[[30.0,0.0],[40.0,0.0]]} |
| {"type":"Polygon","coordinates":[[[-1.0,-1.0],[1.0,-1.0],[1.0,1.0],[0.0,1.0],[-1.0,1.0],[-1.0,-1.0]]]} | 12000 | {"type":"Polygon","coordinates":[[[-1.0,1.0],[1.0,1.0],[1.0,-1.0],[-1.0,-1.0],[-1.0,1.0]]]} |
| {"type":"MultiLineString","coordinates":[[[0.0,0.0],[5.0,0.1],[10.0,0.0]], [[0.0,-5.0],[5.0,0.1],[10.0,5.0]]]} | 12000 | {"type":"MultiLineString","coordinates":[[[0.0,0.0],[10.0,0.0]],[[0.0,-5.0],[10.0,5.0]]]} |
| {"type":"MultiPolygon","coordinates":[[[[-2.0,-2.0],[2.0,-2.0],[2.0,2.0],[0.0,2.1],[-2.0,2.0],[-2.0,... | 12000 | {"type":"MultiPolygon","coordinates":[[[[-2.0,2.0],[2.0,2.0],[2.0,-2.0],[-2.0,-2.0],[-2.0,2.0]], [[1... |
예시 2: 기본 동작
인자 값:
Geometry:GeometryTolerance:ToleranceCoordinate precision:Coordinate precision
| Geometry | Tolerance | Coordinate precision | 출력 |
|---|---|---|---|
| {"type":"Polygon","coordinates":[[[-1.012345,-1.0],[1.012345,-1.0],[1.012345,1.0],[0.0,1.0],[-1.012345,1.0],[-1.012345,-1.0]]]} | 12000 | 3 | {"type":"Polygon","coordinates":[[[-1.012,1.0],[1.012,1.0],[1.012,-1.0],[-1.012,-1.0],[-1.012,1.0]]]} |
| {"type":"Polygon","coordinates":[[[-1.0123456789,-1.0],[1.0123456789,-1.0],[1.0123456789,1.0],[0.0,1.0],[-1.0123456789,1.0],[-1.0123456789,-1.0]]]} | 12000 | 6 | {"type":"Polygon","coordinates":[[[-1.012346,1.0],[1.012346,1.0],[1.012346,-1.0],[-1.012346,-1.0],[-1.012346,1.0]]]} |
| {"type":"Polygon","coordinates":[[[-1.0123456789,-1.0],[1.0123456789,-1.0],[1.0123456789,1.0],[0.0,1.0],[-1.0123456789,1.0],[-1.0123456789,-1.0]]]} | 12000 | 10 | {"type":"Polygon","coordinates":[[[-1.0123456789,1.0],[1.0123456789,1.0],[1.0123456789,-1.0],[-1.0123456789,-1.0],[-1.0123456789,1.0]]]} |
예시 3: null 처리
인자 값:
Geometry:GeometryTolerance:ToleranceCoordinate precision: null
| Geometry | Tolerance | 출력 |
|---|---|---|
| null | 0 | null |
예시 4: 경계 조건
인자 값:
Geometry:GeometryTolerance:ToleranceCoordinate precision:Coordinate precision
| Geometry | Tolerance | Coordinate precision | 출력 |
|---|---|---|---|
| {"type":"Polygon","coordinates":[[[-1.0,-1.0],[1.0,-1.0],[1.0,1.0],[0.0,1.0],[-1.0,1.0],[-1.0,-1.0]]]} | 200000 | 3 | null |
| {"type":"Polygon","coordinates":[[[-1.0,-1.0],[1.0,-1.0],[1.0,1.0],[0.0,1.0],[-1.0,1.0],[-1.0,-1.0]],[[5.0,0.0],[10.0,0.0],[10.0,5.0],[5.0,5.0],[5.0,0.0]]]} | 200000 | 3 | {"type":"Polygon","coordinates":[[[10.0, 5.0], [10.0, 0.0], [5.0, 0.0], [5.0, 5.0], [10.0, 5.0]]]} |
| {"type":"MultiPolygon","coordinates":[[[[-1.0,-1.0],[1.0,-1.0],[1.0,1.0],[0.0,1.0],[-1.0,1.0],[-1.0,-1.0]]],[[[5.0,0.0],[10.0,0.0],[10.0,5.0],[5.0,5.0],[5.0,0.0]]]]} | 200000 | 3 | {"coordinates":[[[10.0, 5.0], [10.0, 0.0], [5.0, 0.0], [5.0, 5.0], [10.0, 5.0]]], "type":"Polygon"} |
| {"type":"MultiPolygon","coordinates":[[[[-1.0,-1.0],[1.0,-1.0],[1.0,1.0],[0.0,1.0],[-1.0,1.0],[-1.0,-1.0]]],[[[5.0,0.0],[10.0,0.0],[10.0,5.0],[5.0,5.0],[5.0,0.0]]]]} | 500000 | 3 | null |
| {"type":"GeometryCollection","geometries":[{"type":"MultiLineString","coordinates":[[[0.0,0.0],[5.0,... | 500000 | 3 | {"type":"GeometryCollection","geometries":[{"type":"MultiLineString","coordinates":[[[0.0, 0.0], [10.0, 0.0]], [[0.0, -5.0],[10.0, 5.0]]]}]} |
| {"type":"GeometryCollection","geometries":[{"type":"Polygon","coordinates":[[[-1.0,-1.0],[1.0,-1.0],... | 500000 | 3 | null |
긴 구조값 안의 줄임표는 생략한 내용을 나타냅니다.