Pengumuman : Semua project nonkomersial yang terdaftar untuk menggunakan Earth Engine sebelum
15 April 2025 harus
memverifikasi kelayakan nonkomersial untuk mempertahankan akses. Jika Anda belum melakukan verifikasi hingga 26 September 2025, akses Anda mungkin ditangguhkan.
Kirim masukan
ee.ImageCollection.reduceToImage
Tetap teratur dengan koleksi
Simpan dan kategorikan konten berdasarkan preferensi Anda.
Membuat gambar dari kumpulan fitur dengan menerapkan peredam pada properti yang dipilih dari semua fitur yang berpotongan dengan setiap piksel.
Penggunaan Hasil ImageCollection. reduceToImage (properties, reducer)
Gambar
Argumen Jenis Detail ini: collection
FeatureCollection Kumpulan fitur untuk berpotongan dengan setiap piksel output. properties
Daftar Properti yang akan dipilih dari setiap fitur dan diteruskan ke reducer. reducer
Pengurang Reducer untuk menggabungkan properti setiap fitur yang berpotongan ke dalam hasil akhir untuk disimpan dalam piksel.
Contoh
Code Editor (JavaScript)
var col = ee . ImageCollection ( 'LANDSAT/LC08/C02/T1_TOA' )
. filterBounds ( ee . Geometry . BBox ( - 124.0 , 43.2 , - 116.5 , 46.3 ))
. filterDate ( '2021' , '2022' );
// Image visualization settings.
var visParams = {
bands : [ 'B4' , 'B3' , 'B2' ],
min : 0.01 ,
max : 0.25
};
Map . addLayer ( col . mean (), visParams , 'RGB mean' );
// Reduce the geometry (footprint) of images in the collection to an image.
// Image property values are applied to the pixels intersecting each
// image's geometry and then a per-pixel reduction is performed according
// to the selected reducer. Here, the image cloud cover property is assigned
// to the pixels intersecting image geometry and then reduced to a single
// image representing the per-pixel mean image cloud cover.
var meanCloudCover = col . reduceToImage ({
properties : [ 'CLOUD_COVER' ],
reducer : ee . Reducer . mean ()
});
Map . setCenter ( - 119.87 , 44.76 , 6 );
Map . addLayer ( meanCloudCover , { min : 0 , max : 50 }, 'Cloud cover mean' );
Penyiapan Python
Lihat halaman
Lingkungan Python untuk mengetahui informasi tentang Python API dan penggunaan
geemap
untuk pengembangan interaktif.
import ee
import geemap.core as geemap
Colab (Python)
col = (
ee . ImageCollection ( 'LANDSAT/LC08/C02/T1_TOA' )
. filterBounds ( ee . Geometry . BBox ( - 124.0 , 43.2 , - 116.5 , 46.3 ))
. filterDate ( '2021' , '2022' )
)
# Image visualization settings.
vis_params = { 'bands' : [ 'B4' , 'B3' , 'B2' ], 'min' : 0.01 , 'max' : 0.25 }
m = geemap . Map ()
m . add_layer ( col . mean (), vis_params , 'RGB mean' )
# Reduce the geometry (footprint) of images in the collection to an image.
# Image property values are applied to the pixels intersecting each
# image's geometry and then a per-pixel reduction is performed according
# to the selected reducer. Here, the image cloud cover property is assigned
# to the pixels intersecting image geometry and then reduced to a single
# image representing the per-pixel mean image cloud cover.
mean_cloud_cover = col . reduceToImage (
properties = [ 'CLOUD_COVER' ], reducer = ee . Reducer . mean ()
)
m . set_center ( - 119.87 , 44.76 , 6 )
m . add_layer ( mean_cloud_cover , { 'min' : 0 , 'max' : 50 }, 'Cloud cover mean' )
m
Kirim masukan
Kecuali dinyatakan lain, konten di halaman ini dilisensikan berdasarkan Lisensi Creative Commons Attribution 4.0 , sedangkan contoh kode dilisensikan berdasarkan Lisensi Apache 2.0 . Untuk mengetahui informasi selengkapnya, lihat Kebijakan Situs Google Developers . Java adalah merek dagang terdaftar dari Oracle dan/atau afiliasinya.
Terakhir diperbarui pada 2025-07-26 UTC.
Ada masukan untuk kami?
[[["Mudah dipahami","easyToUnderstand","thumb-up"],["Memecahkan masalah saya","solvedMyProblem","thumb-up"],["Lainnya","otherUp","thumb-up"]],[["Informasi yang saya butuhkan tidak ada","missingTheInformationINeed","thumb-down"],["Terlalu rumit/langkahnya terlalu banyak","tooComplicatedTooManySteps","thumb-down"],["Sudah usang","outOfDate","thumb-down"],["Masalah terjemahan","translationIssue","thumb-down"],["Masalah kode / contoh","samplesCodeIssue","thumb-down"],["Lainnya","otherDown","thumb-down"]],["Terakhir diperbarui pada 2025-07-26 UTC."],[],[]]