お知らせ :
2025 年 4 月 15 日 より前に Earth Engine の使用を登録したすべての非商用プロジェクトは、Earth Engine へのアクセスを維持するために
非商用目的での利用資格を確認 する必要があります。
フィードバックを送信
ee.Geometry
コレクションでコンテンツを整理
必要に応じて、コンテンツの保存と分類を行います。
ジオメトリを作成します。
用途 戻り値 ee.Geometry(geoJson, proj , geodesic , evenOdd )
ジオメトリ
引数 タイプ 詳細 geoJson
オブジェクト ジオメトリを記述する GeoJSON オブジェクト、または Geometry として再解釈される ComputedObject。GeoJSON 仕様に準拠した CRS 仕様をサポートしますが、名前付き(「リンクされた」CRS ではなく)CRS のみ許可します。これに「geodesic」フィールドが含まれていて、opt_geodesic が指定されていない場合は、opt_geodesic として使用されます。 proj
投影(省略可) オプションの投影仕様。CRS ID コードまたは WKT 文字列のいずれか。指定すると、geoJson パラメータで見つかった CRS がオーバーライドされます。指定されておらず、geoJson で CRS が宣言されていない場合、デフォルトは「EPSG:4326」(x=経度、y=緯度)になります。 geodesic
ブール値、省略可 線分を球状測地線として解釈するかどうか。false の場合、線分は指定された CRS の平面線として解釈されることを示します。指定しない場合、CRS が地理座標系(デフォルトの EPSG:4326 を含む)の場合はデフォルトで true、CRS が投影座標系の場合はデフォルトで false になります。 evenOdd
ブール値、省略可 true の場合、ポリゴンの内部は偶数/奇数ルールによって決定されます。このルールでは、無限遠の点に到達するために奇数のエッジを横切る点が内部にあります。それ以外の場合、ポリゴンは左内側ルールを使用します。このルールでは、指定された順序で頂点を移動すると、内側がシェルのエッジの左側になります。指定しない場合、デフォルトは true です。
例
コードエディタ(JavaScript)
// A GeoJSON object for a triangular polygon.
var geojsonObject = {
"type" : "Polygon" ,
"coordinates" : [
[
[
- 122.085 ,
37.423
],
[
- 122.092 ,
37.424
],
[
- 122.085 ,
37.418
],
[
- 122.085 ,
37.423
]
]
]
};
print ( 'ee.Geometry accepts a GeoJSON object' , ee . Geometry ( geojsonObject ));
// GeoJSON strings need to be converted to an object.
var geojsonString = JSON . stringify ( geojsonObject );
print ( 'A GeoJSON string needs to be converted to an object' ,
ee . Geometry ( JSON . parse ( geojsonString )));
// Use ee.Geometry to cast computed geometry objects into the ee.Geometry
// class to access their methods. In the following example an ee.Geometry
// object is stored as a ee.Feature property. When it is retrieved with the
// .get() function, a computed geometry object is returned. Cast the computed
// object as a ee.Geometry to get the geometry's bounds, for instance.
var feature = ee . Feature ( null , { geom : ee . Geometry ( geojsonObject )});
print ( 'Cast computed geometry objects to ee.Geometry class' ,
ee . Geometry ( feature . get ( 'geom' )). bounds ());
Python の設定
Python API とインタラクティブな開発での geemap
の使用については、
Python 環境 のページをご覧ください。
import ee
import geemap.core as geemap
Colab(Python)
import json
# A GeoJSON object for a triangular polygon.
geojson_object = {
'type' : 'Polygon' ,
'coordinates' : [
[
[
- 122.085 ,
37.423
],
[
- 122.092 ,
37.424
],
[
- 122.085 ,
37.418
],
[
- 122.085 ,
37.423
]
]
]
}
print (
'ee.Geometry accepts a GeoJSON object:' ,
ee . Geometry ( geojson_object ) . getInfo ()
)
# GeoJSON strings need to be converted to an object.
geojson_string = json . dumps ( geojson_object )
print ( 'A GeoJSON string needs to be converted to an object:' ,
ee . Geometry ( json . loads ( geojson_string )) . getInfo ())
# Use ee.Geometry to cast computed geometry objects into the ee.Geometry
# class to access their methods. In the following example an ee.Geometry
# object is stored as a ee.Feature property. When it is retrieved with the
# .get() function, a computed geometry object is returned. Cast the computed
# object as a ee.Geometry to get the geometry's bounds, for instance.
feature = ee . Feature ( None , { 'geom' : ee . Geometry ( geojson_object )})
print ( 'Cast computed geometry objects to ee.Geometry class:' ,
ee . Geometry ( feature . get ( 'geom' )) . bounds () . getInfo ())
フィードバックを送信
特に記載のない限り、このページのコンテンツはクリエイティブ・コモンズの表示 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。"],[[["Creates a geometry from a GeoJSON object, optionally specifying projection, geodesic handling, and polygon winding rule."],["Accepts GeoJSON objects or strings (which must be parsed into objects)."],["Enables casting of computed geometry objects (like those in Feature properties) to the `ee.Geometry` class for method access."],["Supports both JavaScript and Python environments within Google Earth Engine."]]],[]]