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.Image.arrayProject
Koleksiyonlar ile düzeninizi koruyun
İçeriği tercihlerinize göre kaydedin ve kategorilere ayırın.
Tutulacak eksenleri belirterek diziyi her pikselde daha düşük boyutlu bir alana yansıtır. Bırakılan eksenler en fazla 1 uzunluğunda olmalıdır.
Kullanım İadeler Image. arrayProject (axes)
Resim
Bağımsız Değişken Tür Ayrıntılar bu: input
Resim Giriş resmi. axes
Liste Kaldırılmayacak eksenler. Diğer eksenler atılır ve en fazla 1 uzunluğunda olmalıdır.
Örnekler
Kod Düzenleyici (JavaScript)
// A function to print arrays for a selected pixel in the following examples.
function sampArrImg ( arrImg ) {
var point = ee . Geometry . Point ([ - 121 , 42 ]);
return arrImg . sample ( point , 500 ). first (). get ( 'array' );
}
// Create a 2D array image with the 0-axis having length 6 and the 1-axis
// having length 1.
var arrayImg2D = ee . Image ([ 0 , 1 , 2 , 3 , 4 , 5 ]). toArray (). toArray ( 1 );
print ( '2D array image (pixel)' , sampArrImg ( arrayImg2D ));
// [[0],
// [1],
// [2],
// [3],
// [4],
// [5]]
// Project the 2D array to a 1D array, retain the 0-axis (concatenate elements
// from the 1-axis into the 0-axis).
var arrayImg2Dto1D = arrayImg2D . arrayProject ([ 0 ]);
print ( '2D array image (pixel)' , sampArrImg ( arrayImg2Dto1D ));
// [0, 1, 2, 3, 4, 5]
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)
# A function to print arrays for a selected pixel in the following examples.
def samp_arr_img ( arr_img ):
point = ee . Geometry . Point ([ - 121 , 42 ])
return arr_img . sample ( point , 500 ) . first () . get ( 'array' )
# Create a 2D array image with the 0-axis having length 6 and the 1-axis
# having length 1.
array_img_2d = ee . Image ([ 0 , 1 , 2 , 3 , 4 , 5 ]) . toArray () . toArray ( 1 )
print ( '2D array image (pixel):' , samp_arr_img ( array_img_2d ) . getInfo ())
# [[0],
# [1],
# [2],
# [3],
# [4],
# [5]]
# Project the 2D array to a 1D array, retain the 0-axis (concatenate elements
# from the 1-axis into the 0-axis).
array_img_2d_to_1d = array_img_2d . arrayProject ([ 0 ])
print ( '2D array image (pixel):' , samp_arr_img ( array_img_2d_to_1d ) . getInfo ())
# [0, 1, 2, 3, 4, 5]
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."],[],[]]