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.PixelType
Tetap teratur dengan koleksi
Simpan dan kategorikan konten berdasarkan preferensi Anda.
Menampilkan PixelType dengan presisi yang diberikan dengan batas yang diberikan per elemen, dan dimensi opsional.
Penggunaan Hasil ee.PixelType(precision, minValue , maxValue , dimensions )
PixelType
Argumen Jenis Detail precision
Objek Presisi piksel, salah satu dari 'int', 'float', atau 'double'. minValue
Angka, default: null Nilai minimum piksel jenis ini. Jika presisi adalah 'float' atau 'double', nilai ini bisa berupa null, yang menandakan tak terhingga negatif. maxValue
Angka, default: null Nilai maksimum piksel jenis ini. Jika presisi adalah 'float' atau 'double', nilai ini dapat berupa null, yang menandakan tak terhingga positif. dimensions
Bilangan bulat, default: 0 Jumlah dimensi tempat piksel jenis ini dapat bervariasi; 0 adalah skalar, 1 adalah vektor, 2 adalah matriks, dll.
Contoh
Code Editor (JavaScript)
print ( ee . PixelType ( 'int' , 0 , 1 )); // int ∈ [0, 1]
print ( ee . PixelType ( 'int' , - 20 , - 10 )); // int ∈ [-20, -10]
print ( ee . PixelType ( 'float' )); // float
print ( ee . PixelType ( 'double' )); // double
print ( ee . PixelType ( 'double' , null )); // double
print ( ee . PixelType ( 'double' , null , null )); // double
print ( ee . PixelType ( 'double' , null , null , 0 )); // double
print ( ee . PixelType ( 'double' , null , null , 1 )); // double, 1 dimensions
print ( ee . PixelType ( 'double' , null , null , 2 )); // double, 2 dimensions
print ( ee . PixelType ( 'double' , null , null , 3 )); // double, 3 dimensions
print ( ee . PixelType ( 'double' , null , null , 10 )); // double, 10 dimensions
print ( ee . PixelType ( 'double' , null , null , 1e8 )); // double, 100000000 dimensions
print ( ee . PixelType ( 'double' , 1 , 2 , 0 )); // double ∈ [1, 2]
print ( ee . PixelType ( 'double' , 1 , 3 , 2 )); // double ∈ [1, 3], 2 dimensions
print ( ee . PixelType ( 'double' , - 4 , - 3 , 0 )); // double ∈ [-4, -3]
print ( ee . PixelType ( 'double' , null , 2.3 , 0 )); // double
print ( ee . PixelType ( 'double' , 3.4 , null , 0 )); // double
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)
print ( ee . PixelType ( 'int' , 0 , 1 ) . getInfo ()) # int ∈ [0, 1]
print ( ee . PixelType ( 'int' , - 20 , - 10 ) . getInfo ()) # int ∈ [-20, -10]
print ( ee . PixelType ( 'float' ) . getInfo ()) # float
print ( ee . PixelType ( 'double' ) . getInfo ()) # double
print ( ee . PixelType ( 'double' , None ) . getInfo ()) # double
print ( ee . PixelType ( 'double' , None , None ) . getInfo ()) # double
print ( ee . PixelType ( 'double' , None , None , 0 ) . getInfo ()) # double
print ( ee . PixelType ( 'double' , None , None , 1 ) . getInfo ()) # double, 1 dimensions
print ( ee . PixelType ( 'double' , None , None , 2 ) . getInfo ()) # double, 2 dimensions
print ( ee . PixelType ( 'double' , None , None , 3 ) . getInfo ()) # double, 3 dimensions
print ( ee . PixelType ( 'double' , None , None , 10 ) . getInfo ()) # double, 10 dimensions
# double, 100000000 dimensions
print ( ee . PixelType ( 'double' , None , None , 1e8 ) . getInfo ())
print ( ee . PixelType ( 'double' , 1 , 2 , 0 ) . getInfo ()) # double ∈ [1, 2]
# double ∈ [1, 3], 2 dimensions
print ( ee . PixelType ( 'double' , 1 , 3 , 2 ) . getInfo ())
print ( ee . PixelType ( 'double' , - 4 , - 3 , 0 ) . getInfo ()) # double ∈ [-4, -3]
print ( ee . PixelType ( 'double' , None , 2.3 , 0 ) . getInfo ()) # double
print ( ee . PixelType ( 'double' , 3.4 , None , 0 ) . getInfo ()) # double
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."],[],[]]