ee.Geometry.MultiPoint.simplify

지정된 오차 범위 내에서 도형을 단순화합니다. maxError가 명시적으로 null로 지정되지 않는 한 이 알고리즘의 소비자가 요청한 오차 범위를 준수하지 않습니다.

이렇게 하면 오차 범위를 전파하는 기본 Earth Engine 정책이 재정의되므로 출력에서 요청된 도형 정확도와 관계없이 입력은 이 알고리즘의 인수에 지정된 오차 범위로 요청됩니다. 이렇게 하면 렌더링된 벡터 지도의 모든 확대/축소 수준에서 일관된 렌더링이 이루어지지만 확대/축소 수준이 낮을수록 (즉, 축소됨) 도형이 단순화되지 않아 성능이 저하될 수 있습니다.

사용반환 값
MultiPoint.simplify(maxError, proj)도형
인수유형세부정보
geometry도형단순화할 도형입니다.
maxErrorErrorMargin결과가 입력과 다를 수 있는 최대 오차입니다.
proj투영, 기본값: null지정된 경우 결과는 이 투영에 포함됩니다. 그렇지 않으면 입력과 동일한 투영에 포함됩니다. 오차 범위가 투영된 단위로 지정된 경우 범위는 이 투영의 단위로 해석됩니다.

코드 편집기(JavaScript)

// Define a MultiPoint object.
var multiPoint = ee.Geometry.MultiPoint([[-122.082, 37.420], [-122.081, 37.426]]);

// Apply the simplify method to the MultiPoint object.
var multiPointSimplify = multiPoint.simplify({'maxError': 1});

// Print the result to the console.
print('multiPoint.simplify(...) =', multiPointSimplify);

// Display relevant geometries on the map.
Map.setCenter(-122.085, 37.422, 15);
Map.addLayer(multiPoint,
             {'color': 'black'},
             'Geometry [black]: multiPoint');
Map.addLayer(multiPointSimplify,
             {'color': 'red'},
             'Result [red]: multiPoint.simplify');

Python 설정

Python API 및 대화형 개발을 위한 geemap 사용에 관한 자세한 내용은 Python 환경 페이지를 참고하세요.

import ee
import geemap.core as geemap

Colab (Python)

# Define a MultiPoint object.
multipoint = ee.Geometry.MultiPoint([[-122.082, 37.420], [-122.081, 37.426]])

# Apply the simplify method to the MultiPoint object.
multipoint_simplify = multipoint.simplify(maxError=1)

# Print the result.
display('multipoint.simplify(...) =', multipoint_simplify)

# Display relevant geometries on the map.
m = geemap.Map()
m.set_center(-122.085, 37.422, 15)
m.add_layer(multipoint, {'color': 'black'}, 'Geometry [black]: multipoint')
m.add_layer(
    multipoint_simplify, {'color': 'red'}, 'Result [red]: multipoint.simplify'
)
m