Earth Engine は、共有コンピューティング リソースを保護し、すべてのユーザーに信頼性の高いパフォーマンスを提供するために、
非商用割り当て階層 を導入しています。すべての非商用プロジェクトは、
2026 年 4 月 27 日 までに割り当て階層を選択する必要があります。選択しない場合は、デフォルトでコミュニティ階層が使用されます。階層の割り当ては、
2026 年 4 月 27 日 に(階層の選択日に関係なく)すべてのプロジェクトで有効になります。
詳細
フィードバックを送信
ee.Geometry.MultiPolygon.union
コレクションでコンテンツを整理
必要に応じて、コンテンツの保存と分類を行います。
2 つのジオメトリの和を返します。
用途 戻り値 MultiPolygon. union (right, maxError , proj )ジオメトリ
引数 タイプ 詳細 これ: left ジオメトリ オペレーションの左オペランドとして使用されるジオメトリ。 rightジオメトリ 演算の右オペランドとして使用されるジオメトリ。 maxErrorErrorMargin、デフォルト: null 必要な再投影を行う際に許容される最大誤差。 projProjection、デフォルト: null オペレーションを実行するプロジェクション。指定しない場合、演算は球面座標系で実行され、線形距離は球面のメートル単位になります。
例
コードエディタ(JavaScript)
// Define a MultiPolygon object.
var multiPolygon = ee . Geometry . MultiPolygon (
[[[[ - 122.092 , 37.424 ],
[ - 122.086 , 37.418 ],
[ - 122.079 , 37.425 ],
[ - 122.085 , 37.423 ]]],
[[[ - 122.081 , 37.417 ],
[ - 122.086 , 37.421 ],
[ - 122.089 , 37.416 ]]]]);
// Define other inputs.
var inputGeom = ee . Geometry . BBox ( - 122.085 , 37.415 , - 122.075 , 37.425 );
// Apply the union method to the MultiPolygon object.
var multiPolygonUnion = multiPolygon . union ({ 'right' : inputGeom , 'maxError' : 1 });
// Print the result to the console.
print ( 'multiPolygon.union(...) =' , multiPolygonUnion );
// Display relevant geometries on the map.
Map . setCenter ( - 122.085 , 37.422 , 15 );
Map . addLayer ( multiPolygon ,
{ 'color' : 'black' },
'Geometry [black]: multiPolygon' );
Map . addLayer ( inputGeom ,
{ 'color' : 'blue' },
'Parameter [blue]: inputGeom' );
Map . addLayer ( multiPolygonUnion ,
{ 'color' : 'red' },
'Result [red]: multiPolygon.union' );
Python の設定
Python API とインタラクティブな開発での geemap の使用については、
Python 環境 のページをご覧ください。
import ee
import geemap.core as geemap
Colab(Python)
# Define a MultiPolygon object.
multipolygon = ee . Geometry . MultiPolygon ([
[[
[ - 122.092 , 37.424 ],
[ - 122.086 , 37.418 ],
[ - 122.079 , 37.425 ],
[ - 122.085 , 37.423 ],
]],
[[[ - 122.081 , 37.417 ], [ - 122.086 , 37.421 ], [ - 122.089 , 37.416 ]]],
])
# Define other inputs.
input_geom = ee . Geometry . BBox ( - 122.085 , 37.415 , - 122.075 , 37.425 )
# Apply the union method to the MultiPolygon object.
multipolygon_union = multipolygon . union ( right = input_geom , maxError = 1 )
# Print the result.
display ( 'multipolygon.union(...) =' , multipolygon_union )
# Display relevant geometries on the map.
m = geemap . Map ()
m . set_center ( - 122.085 , 37.422 , 15 )
m . add_layer (
multipolygon , { 'color' : 'black' }, 'Geometry [black]: multipolygon'
)
m . add_layer ( input_geom , { 'color' : 'blue' }, 'Parameter [blue]: input_geom' )
m . add_layer (
multipolygon_union , { 'color' : 'red' }, 'Result [red]: multipolygon.union'
)
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 `union` method combines two geometries, a `left` and a `right`, into a single geometry representing their union. Optional parameters include `maxError`, which sets the tolerated error during reprojection, and `proj`, the operation's projection. The method returns a new geometry. Example shows creating a `MultiPolygon` object, a `BBox` geometry, and combining them with a `union` call, the result then being printed and displayed on a map.\n"]]