お知らせ :
2025 年 4 月 15 日 より前に Earth Engine の使用を登録したすべての非商用プロジェクトは、アクセスを維持するために
非商用目的での利用資格を確認 する必要があります。2025 年 9 月 26 日までに確認が完了していない場合、アクセスが保留されることがあります。
フィードバックを送信
ee.Geometry.MultiLineString.symmetricDifference
コレクションでコンテンツを整理
必要に応じて、コンテンツの保存と分類を行います。
2 つのジオメトリの対称差を返します。
用途 戻り値 MultiLineString. symmetricDifference (right, maxError , proj )
ジオメトリ
引数 タイプ 詳細 これ: left
ジオメトリ オペレーションの左オペランドとして使用されるジオメトリ。 right
ジオメトリ 演算の右オペランドとして使用されるジオメトリ。 maxError
ErrorMargin、デフォルト: null 必要な再投影を行う際に許容される最大誤差。 proj
Projection、デフォルト: null オペレーションを実行するプロジェクション。指定しない場合、演算は球面座標系で実行され、線形距離は球面のメートル単位になります。
例
コードエディタ(JavaScript)
// Define a MultiLineString object.
var multiLineString = ee . Geometry . MultiLineString (
[[[ - 122.088 , 37.418 ], [ - 122.086 , 37.422 ], [ - 122.082 , 37.418 ]],
[[ - 122.087 , 37.416 ], [ - 122.083 , 37.416 ], [ - 122.082 , 37.419 ]]]);
// Define other inputs.
var inputGeom = ee . Geometry . BBox ( - 122.085 , 37.415 , - 122.075 , 37.425 );
// Apply the symmetricDifference method to the MultiLineString object.
var multiLineStringSymmetricDifference = multiLineString . symmetricDifference ({ 'right' : inputGeom , 'maxError' : 1 });
// Print the result to the console.
print ( 'multiLineString.symmetricDifference(...) =' , multiLineStringSymmetricDifference );
// Display relevant geometries on the map.
Map . setCenter ( - 122.085 , 37.422 , 15 );
Map . addLayer ( multiLineString ,
{ 'color' : 'black' },
'Geometry [black]: multiLineString' );
Map . addLayer ( inputGeom ,
{ 'color' : 'blue' },
'Parameter [blue]: inputGeom' );
Map . addLayer ( multiLineStringSymmetricDifference ,
{ 'color' : 'red' },
'Result [red]: multiLineString.symmetricDifference' );
Python の設定
Python API とインタラクティブな開発での geemap
の使用については、
Python 環境 のページをご覧ください。
import ee
import geemap.core as geemap
Colab(Python)
# Define a MultiLineString object.
multilinestring = ee . Geometry . MultiLineString ([
[[ - 122.088 , 37.418 ], [ - 122.086 , 37.422 ], [ - 122.082 , 37.418 ]],
[[ - 122.087 , 37.416 ], [ - 122.083 , 37.416 ], [ - 122.082 , 37.419 ]],
])
# Define other inputs.
input_geom = ee . Geometry . BBox ( - 122.085 , 37.415 , - 122.075 , 37.425 )
# Apply the symmetricDifference method to the MultiLineString object.
multilinestring_symmetric_difference = multilinestring . symmetricDifference (
right = input_geom , maxError = 1
)
# Print the result.
display (
'multilinestring.symmetricDifference(...) =' ,
multilinestring_symmetric_difference ,
)
# Display relevant geometries on the map.
m = geemap . Map ()
m . set_center ( - 122.085 , 37.422 , 15 )
m . add_layer (
multilinestring , { 'color' : 'black' }, 'Geometry [black]: multilinestring'
)
m . add_layer ( input_geom , { 'color' : 'blue' }, 'Parameter [blue]: input_geom' )
m . add_layer (
multilinestring_symmetric_difference ,
{ 'color' : 'red' },
'Result [red]: multilinestring.symmetricDifference' ,
)
m
フィードバックを送信
特に記載のない限り、このページのコンテンツはクリエイティブ・コモンズの表示 4.0 ライセンス により使用許諾されます。コードサンプルは Apache 2.0 ライセンス により使用許諾されます。詳しくは、Google Developers サイトのポリシー をご覧ください。Java は Oracle および関連会社の登録商標です。
最終更新日 2025-07-26 UTC。
ご意見をお聞かせください
[[["わかりやすい","easyToUnderstand","thumb-up"],["問題の解決に役立った","solvedMyProblem","thumb-up"],["その他","otherUp","thumb-up"]],[["必要な情報がない","missingTheInformationINeed","thumb-down"],["複雑すぎる / 手順が多すぎる","tooComplicatedTooManySteps","thumb-down"],["最新ではない","outOfDate","thumb-down"],["翻訳に関する問題","translationIssue","thumb-down"],["サンプル / コードに問題がある","samplesCodeIssue","thumb-down"],["その他","otherDown","thumb-down"]],["最終更新日 2025-07-26 UTC。"],[],["The `symmetricDifference` method calculates the symmetric difference between two geometries, a `left` and a `right`. This operation returns a new `Geometry` object. It accepts an optional `maxError` parameter for reprojection tolerance and a `proj` parameter to specify the projection. The method is demonstrated using a `MultiLineString` object and a bounding box geometry. The examples display the original geometries alongside the resulting symmetric difference on a map.\n"]]