ee.Geometry.MultiPoint.simplify

指定された誤差範囲内でジオメトリを簡略化します。maxError が明示的に null に指定されていない限り、このアルゴリズムのコンシューマーがリクエストした誤差範囲は考慮されません。

これにより、誤差範囲を伝播するためのデフォルトの Earth Engine ポリシーがオーバーライドされるため、出力から要求されたジオメトリの精度に関係なく、入力は、このアルゴリズムの引数で指定された誤差範囲で要求されます。これにより、レンダリングされたベクターマップのすべてのズームレベルで一貫したレンダリングが実現しますが、ズームレベルが低い(ズームアウト)場合、ジオメトリが簡略化されないため、パフォーマンスが低下する可能性があります。

用途戻り値
MultiPoint.simplify(maxError, proj)ジオメトリ
引数タイプ詳細
これ: geometryジオメトリ簡略化するジオメトリ。
maxErrorErrorMargin結果が入力と異なる可能性がある最大誤差。
projProjection、デフォルト: 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