Earth Engine ขอแนะนำ
ระดับโควต้าที่ไม่ใช่เชิงพาณิชย์เพื่อปกป้องทรัพยากรการประมวลผลที่ใช้ร่วมกันและรับประกันประสิทธิภาพที่เชื่อถือได้สำหรับทุกคน โปรเจ็กต์ที่ไม่ใช่เชิงพาณิชย์ทั้งหมดจะต้องเลือกระดับโควต้าภายในวันที่
27 เมษายน 2026 หรือจะใช้ระดับชุมชนโดยค่าเริ่มต้นก็ได้ โควต้าระดับจะมีผลกับโปรเจ็กต์ทั้งหมด (ไม่ว่าวันที่เลือกระดับจะเป็นวันใด) ในวันที่
27 เมษายน 2026 ดูข้อมูลเพิ่มเติม
Google uses AI technology to translate content into your preferred language. AI translations can contain errors.
ee.Array
จัดทุกอย่างให้เป็นระเบียบอยู่เสมอด้วยคอลเล็กชัน
บันทึกและจัดหมวดหมู่เนื้อหาตามค่ากำหนดของคุณ
แสดงผลอาร์เรย์ที่มีพิกัดที่ระบุ
| การใช้งาน | การคืนสินค้า |
|---|
ee.Array(values, pixelType) | อาร์เรย์ |
| อาร์กิวเมนต์ | ประเภท | รายละเอียด |
|---|
values | วัตถุ | อาร์เรย์ที่มีอยู่เพื่อส่งผ่าน หรือตัวเลข/รายการตัวเลข/รายการตัวเลขที่ซ้อนกันที่มีความลึกใดก็ได้เพื่อสร้างอาร์เรย์จาก สำหรับลิสต์ที่ซ้อนกัน อาร์เรย์ด้านในทั้งหมดที่ระดับความลึกเดียวกันต้องมีความยาวเท่ากัน และตัวเลขจะปรากฏได้ที่ระดับลึกที่สุดเท่านั้น |
pixelType | PixelType, ค่าเริ่มต้น: null | ประเภทของตัวเลขแต่ละตัวในอาร์กิวเมนต์ค่า หากไม่ได้ระบุประเภทพิกเซล ระบบจะอนุมานจากตัวเลขใน "ค่า" หากไม่มีตัวเลขใน "ค่า" คุณต้องระบุประเภทนี้ |
ตัวอย่าง
โปรแกรมแก้ไขโค้ด (JavaScript)
// Requires an explicit PixelType if no data.
print(ee.Array([], ee.PixelType.int8())); // Empty []
print(ee.Array([[]], ee.PixelType.uint8())); // Empty [[]]
print(ee.Array([[], []], ee.PixelType.float())); // Empty [[], []]
// 1-D Arrays
print(ee.Array([0])); // [0]
print(ee.Array([0, 1])); // [0, 1]
// 2-D Arrays
print(ee.Array([[1]])); // [[1]]
print(ee.Array([[0, 1], [2, 3]])); // [[0,1],[2,3]]
// Arrays from ee.Number.
print(ee.Array([ee.Number(123).toUint8()])); // [123]
// Lists are useful ways to construct larger Arrays.
print(ee.Array(ee.List.sequence(0, 10, 2))); // [0,2,4,6,8,10]
// Arrays can be used to make Arrays.
var array1D = ee.Array([1, 2, 3]);
// This is a cast.
print(ee.Array(array1D)); // [1,2,3]
การตั้งค่า Python
ดูข้อมูลเกี่ยวกับ Python API และการใช้ geemap เพื่อการพัฒนาแบบอินเทอร์แอกทีฟได้ที่หน้า
สภาพแวดล้อม Python
import ee
import geemap.core as geemap
Colab (Python)
# Requires an explicit PixelType if no data.
display(ee.Array([], ee.PixelType.int8())) # Empty []
display(ee.Array([[]], ee.PixelType.uint8())) # Empty [[]]
display(ee.Array([[], []], ee.PixelType.float())) # Empty [[], []]
# 1-D Arrays
display(ee.Array([0])) # [0]
display(ee.Array([0, 1])) # [0, 1]
# 2-D Arrays
display(ee.Array([[1]])) # [[1]]
display(ee.Array([[0, 1], [2, 3]])) # [[0,1],[2,3]]
# Arrays from ee.Number.
display(ee.Array([ee.Number(123).toUint8()])) # [123]
# Lists are useful ways to construct larger Arrays.
display(ee.Array(ee.List.sequence(0, 10, 2))) # [0, 2, 4, 6, 8, 10]
# Arrays can be used to make Arrays.
array_one = ee.Array([1, 2, 3])
# This is a cast.
display(ee.Array(array_one)) # [1, 2, 3]
เนื้อหาของหน้าเว็บนี้ได้รับอนุญาตภายใต้ใบอนุญาตที่ต้องระบุที่มาของครีเอทีฟคอมมอนส์ 4.0 และตัวอย่างโค้ดได้รับอนุญาตภายใต้ใบอนุญาต Apache 2.0 เว้นแต่จะระบุไว้เป็นอย่างอื่น โปรดดูรายละเอียดที่นโยบายเว็บไซต์ Google Developers Java เป็นเครื่องหมายการค้าจดทะเบียนของ Oracle และ/หรือบริษัทในเครือ
อัปเดตล่าสุด 2025-10-30 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-10-30 UTC"],[],[]]