お知らせ :
2025 年 4 月 15 日 より前に Earth Engine の使用を登録したすべての非商用プロジェクトは、アクセスを維持するために
非商用目的での利用資格を確認 する必要があります。2025 年 9 月 26 日までに確認が完了していない場合、アクセスが保留されることがあります。
フィードバックを送信
ee.ImageCollection.getRegion
コレクションでコンテンツを整理
必要に応じて、コンテンツの保存と分類を行います。
ImageCollection 内の各 [ピクセル、バンド、画像] タプルの値の配列を出力します。出力には、指定されたリージョンの各ピクセルと交差する各画像の ID、経度、緯度、時間、すべてのバンドの行が含まれます。1,048,576 個を超える値を抽出しようとすると、エラーが発生します。
用途 戻り値 ImageCollection. getRegion (geometry, scale , crs , crsTransform )
リスト
引数 タイプ 詳細 これ: collection
ImageCollection データを抽出する画像コレクション。 geometry
ジオメトリ データを抽出するリージョン。 scale
浮動小数点数、デフォルト: null 作業する投影のメートル単位の名義尺度。 crs
投影(省略可) 作業する投影法。指定しない場合、デフォルトで EPSG:4326 になります。スケールに加えて指定された場合、投影は指定されたスケールに再スケーリングされます。 crsTransform
リスト、デフォルト: null CRS 変換値の配列。これは、3x2 アフィン変換の行優先順です。このオプションはスケール オプションと相互に排他的であり、指定された投影にすでに設定されている変換を置き換えます。
例
コードエディタ(JavaScript)
// A Landsat 8 TOA image collection (3 months at a specific point, RGB bands).
var col = ee . ImageCollection ( 'LANDSAT/LC08/C02/T1_TOA' )
. filterBounds ( ee . Geometry . Point ( - 90.70 , 34.71 ))
. filterDate ( '2020-07-01' , '2020-10-01' )
. select ( 'B[2-4]' );
print ( 'Collection' , col );
// Define a region to get pixel values for. This is a small rectangle region
// that intersects 2 image pixels at 30-meter scale.
var roi = ee . Geometry . BBox ( - 90.496353 , 34.851971 , - 90.495749 , 34.852197 );
// Display the region of interest overlaid on an image representative. Note
// the ROI intersection with 2 pixels.
var visParams = {
bands : [ 'B4' , 'B3' , 'B2' ],
min : 0.128 ,
max : 0.163
};
Map . setCenter ( - 90.49605 , 34.85211 , 19 );
Map . addLayer ( col . first (), visParams , 'Image representative' );
Map . addLayer ( roi , { color : 'white' }, 'ROI' );
// Fetch pixel-level information from all images in the collection for the
// pixels intersecting the ROI.
var pixelInfoBbox = col . getRegion ({
geometry : roi ,
scale : 30
});
// The result is a table (a list of lists) where the first row is column
// labels and subsequent rows are image pixels. Columns contain values for
// the image ID ('system:index'), pixel longitude and latitude, image
// observation time ('system:time_start'), and bands. In this example, note
// that there are 5 images and the region intersects 2 pixels, so n rows
// equals 11 (5 * 2 + 1). All collection images must have the same number of
// bands with the same names.
print ( 'Extracted pixel info' , pixelInfoBbox );
// The function accepts all geometry types (e.g., points, lines, polygons).
// Here, a multi-point geometry with two points is used.
var points = ee . Geometry . MultiPoint ([[ - 90.49 , 34.85 ], [ - 90.48 , 34.84 ]]);
var pixelInfoPoints = col . getRegion ({
geometry : points ,
scale : 30
});
print ( 'Point geometry example' , pixelInfoPoints );
Python の設定
Python API とインタラクティブな開発での geemap
の使用については、
Python 環境 のページをご覧ください。
import ee
import geemap.core as geemap
Colab(Python)
# A Landsat 8 TOA image collection (3 months at a specific point, RGB bands).
col = (
ee . ImageCollection ( 'LANDSAT/LC08/C02/T1_TOA' )
. filterBounds ( ee . Geometry . Point ( - 90.70 , 34.71 ))
. filterDate ( '2020-07-01' , '2020-10-01' )
. select ( 'B[2-4]' )
)
display ( 'Collection' , col )
# Define a region to get pixel values for. This is a small rectangle region
# that intersects 2 image pixels at 30-meter scale.
roi = ee . Geometry . BBox ( - 90.496353 , 34.851971 , - 90.495749 , 34.852197 )
# Display the region of interest overlaid on an image representative. Note
# the ROI intersection with 2 pixels.
vis_params = { 'bands' : [ 'B4' , 'B3' , 'B2' ], 'min' : 0.128 , 'max' : 0.163 }
m = geemap . Map ()
m . set_center ( - 90.49605 , 34.85211 , 19 )
m . add_layer ( col . first (), vis_params , 'Image representative' )
m . add_layer ( roi , { 'color' : 'white' }, 'ROI' )
display ( m )
# Fetch pixel-level information from all images in the collection for the
# pixels intersecting the ROI.
pixel_info_bbox = col . getRegion ( geometry = roi , scale = 30 )
# The result is a table (a list of lists) where the first row is column
# labels and subsequent rows are image pixels. Columns contain values for
# the image ID ('system:index'), pixel longitude and latitude, image
# observation time ('system:time_start'), and bands. In this example, note
# that there are 5 images and the region intersects 2 pixels, so n rows
# equals 11 (5 * 2 + 1). All collection images must have the same number of
# bands with the same names.
display ( 'Extracted pixel info' , pixel_info_bbox )
# The function accepts all geometry types (e.g., points, lines, polygons).
# Here, a multi-point geometry with two points is used.
points = ee . Geometry . MultiPoint ([[ - 90.49 , 34.85 ], [ - 90.48 , 34.84 ]])
pixel_info_points = col . getRegion ( geometry = points , scale = 30 )
display ( 'Point geometry example' , pixel_info_points )
フィードバックを送信
特に記載のない限り、このページのコンテンツはクリエイティブ・コモンズの表示 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 `ImageCollection.getRegion` method extracts pixel values from an ImageCollection within a specified geometry. It returns a list containing rows of data for each \\[pixel, band, image\\] tuple, including id, longitude, latitude, time, and band values. Users define the extraction region, scale, and optionally the projection. The output format is a table where rows represent pixels and columns detail each image's data. The method accepts various geometry types but is limited to extracting 1,048,576 values per request.\n"]]