Duyuru :
15 Nisan 2025 'ten önce Earth Engine'i kullanmak için kaydedilen tüm ticari olmayan projelerin erişimlerini sürdürebilmeleri için
ticari olmayan uygunluklarını doğrulamaları gerekir. 26 Eylül 2025'e kadar doğrulama yapmazsanız erişiminiz bekletilebilir.
Geri bildirim gönderin
ee.FeatureCollection.reduceToImage
Koleksiyonlar ile düzeninizi koruyun
İçeriği tercihlerinize göre kaydedin ve kategorilere ayırın.
Her pikselle kesişen tüm özelliklerin seçili özelliklerine bir azaltıcı uygulayarak özellik koleksiyonundan bir resim oluşturur.
Kullanım İadeler FeatureCollection. reduceToImage (properties, reducer)
Resim
Bağımsız Değişken Tür Ayrıntılar bu: collection
FeatureCollection Her çıkış pikseliyle kesişecek özellik koleksiyonu. properties
Liste Her özellikten seçilip küçültücüye aktarılacak özellikler. reducer
Azaltıcı Her kesişen özelliğin özelliklerini pikselde depolanacak nihai bir sonuçta birleştiren bir azaltıcı.
Örnekler
Kod Düzenleyici (JavaScript)
// FeatureCollection of power plants in Belgium.
var fc = ee . FeatureCollection ( 'WRI/GPPD/power_plants' )
. filter ( 'country_lg == "Belgium"' );
// Create an image from features; pixel values are determined from reduction of
// property values of the features intersecting each pixel.
var image = fc . reduceToImage ({
properties : [ 'gwh_estimt' ],
reducer : ee . Reducer . sum ()
});
// The goal is to sum the electricity generated in 2015 for the power plants
// intersecting 10 km cells and view the result as a map layer.
// ee.FeatureCollection.reduceToImage does not allow the image projection to be
// set because it is waiting on downstream functions that include "crs",
// "scale", and "crsTransform" parameters to define it (e.g., Export.image.*).
// Here, we'll force the projection with ee.Image.reproject so the result can be
// viewed in the map. Note that using small scales with reproject while viewing
// large regions breaks the features that make Earth Engine fast and may result
// in poor performance and/or errors.
image = image . reproject ( 'EPSG:3035' , null , 10000 );
// Display the image on the map.
Map . setCenter ( 4.3376 , 50.947 , 8 );
Map . setLocked ( true );
Map . addLayer (
image . updateMask ( image . gt ( 0 )),
{ min : 0 , max : 2000 , palette : [ 'yellow' , 'orange' , 'red' ]},
'Total estimated annual electricity generation, 2015' );
Map . addLayer ( fc , null , 'Belgian power plants' );
Python kurulumu
Python API'si ve etkileşimli geliştirme için geemap
kullanımı hakkında bilgi edinmek üzere
Python Ortamı sayfasına bakın.
import ee
import geemap.core as geemap
Colab (Python)
# FeatureCollection of power plants in Belgium.
fc = ee . FeatureCollection ( 'WRI/GPPD/power_plants' ) . filter (
'country_lg == "Belgium"'
)
# Create an image from features pixel values are determined from reduction of
# property values of the features intersecting each pixel.
image = fc . reduceToImage ( properties = [ 'gwh_estimt' ], reducer = ee . Reducer . sum ())
# The goal is to sum the electricity generated in 2015 for the power plants
# intersecting 10 km cells and view the result as a map layer.
# ee.FeatureCollection.reduceToImage does not allow the image projection to be
# set because it is waiting on downstream functions that include "crs",
# "scale", and "crsTransform" parameters to define it (e.g., Export.image.*).
# Here, we'll force the projection with ee.Image.reproject so the result can be
# viewed in the map. Note that using small scales with reproject while viewing
# large regions breaks the features that make Earth Engine fast and may result
# in poor performance and/or errors.
image = image . reproject ( 'EPSG:3035' , None , 10000 )
# Display the image on the map.
m = geemap . Map ()
m . set_center ( 4.3376 , 50.947 , 8 )
m . add_layer (
image . updateMask ( image . gt ( 0 )),
{ 'min' : 0 , 'max' : 2000 , 'palette' : [ 'yellow' , 'orange' , 'red' ]},
'Total estimated annual electricity generation, 2015' ,
)
m . add_layer ( fc , None , 'Belgian power plants' )
m
Geri bildirim gönderin
Aksi belirtilmediği sürece bu sayfanın içeriği Creative Commons Atıf 4.0 Lisansı altında ve kod örnekleri Apache 2.0 Lisansı altında lisanslanmıştır. Ayrıntılı bilgi için Google Developers Site Politikaları 'na göz atın. Java, Oracle ve/veya satış ortaklarının tescilli ticari markasıdır.
Son güncelleme tarihi: 2025-07-26 UTC.
Bize geri bildirimde bulunmak mı istiyorsunuz?
[[["Anlaması kolay","easyToUnderstand","thumb-up"],["Sorunumu çözdü","solvedMyProblem","thumb-up"],["Diğer","otherUp","thumb-up"]],[["İhtiyacım olan bilgiler yok","missingTheInformationINeed","thumb-down"],["Çok karmaşık / çok fazla adım var","tooComplicatedTooManySteps","thumb-down"],["Güncel değil","outOfDate","thumb-down"],["Çeviri sorunu","translationIssue","thumb-down"],["Örnek veya kod sorunu","samplesCodeIssue","thumb-down"],["Diğer","otherDown","thumb-down"]],["Son güncelleme tarihi: 2025-07-26 UTC."],[],[]]