ภาพรวมอาร์เรย์
จัดทุกอย่างให้เป็นระเบียบอยู่เสมอด้วยคอลเล็กชัน
บันทึกและจัดหมวดหมู่เนื้อหาตามค่ากำหนดของคุณ
Earth Engine แสดงเวกเตอร์ 1 มิติ แมทริกซ์ 2 มิติ คิวบ์ 3 มิติ และไฮเปอร์คิวบ์มิติที่สูงกว่าด้วยประเภท ee.Array
อาร์เรย์เป็นโครงสร้างข้อมูลที่ยืดหยุ่น แต่ข้อเสียคือไม่สามารถปรับขนาดได้ดีเท่ากับโครงสร้างข้อมูลอื่นๆ ใน Earth Engine หากแก้ปัญหาได้โดยไม่ต้องใช้อาร์เรย์ ระบบจะคำนวณผลลัพธ์ได้เร็วและมีประสิทธิภาพมากขึ้น แต่หากปัญหาต้องใช้โมเดลมิติข้อมูลระดับสูงขึ้น พีชคณิตเชิงเส้นแบบยืดหยุ่น หรืออย่างอื่นที่แอนนาลัยส์เหมาะอย่างยิ่ง คุณก็ใช้คลาส Array
ได้
มิติ รูปร่าง และขนาดของอาร์เรย์
มิติข้อมูลของอาร์เรย์หมายถึงจํานวนแกนตามข้อมูลที่สําคัญจะแตกต่างกัน เช่น อาร์เรย์ 0 มิติคือตัวเลขสเกลาร์ อาร์เรย์ 1 มิติคือเวกเตอร์ อาร์เรย์ 2 มิติคือเมทริกซ์ อาร์เรย์ 3 มิติคือลูกบาศก์ และอาร์เรย์มากกว่า 3 มิติคือไฮเปอร์ลูกบาศก์ สําหรับอาร์เรย์ N มิติ จะมีแกน N แกนตั้งแต่ 0 ถึง N-1 รูปร่างของอาร์เรย์จะกำหนดโดยความยาวของแกน ความยาวของแกนคือจํานวนตําแหน่งตามแกน ขนาดอาร์เรย์หรือจํานวนองค์ประกอบทั้งหมดในอาร์เรย์เท่ากับผลคูณของความยาวแกน ค่าแต่ละค่าในทุกตําแหน่งในแกนทุกแกนต้องเป็นตัวเลขที่ถูกต้อง เนื่องจากขณะนี้ระบบยังไม่รองรับอาร์เรย์แบบเบาบางหรือแบบไม่สม่ำเสมอ ประเภทองค์ประกอบของอาร์เรย์จะระบุประเภทตัวเลขขององค์ประกอบแต่ละรายการ โดยองค์ประกอบทั้งหมดของอาร์เรย์จะมีประเภทเดียวกัน
เนื้อหาของหน้าเว็บนี้ได้รับอนุญาตภายใต้ใบอนุญาตที่ต้องระบุที่มาของครีเอทีฟคอมมอนส์ 4.0 และตัวอย่างโค้ดได้รับอนุญาตภายใต้ใบอนุญาต Apache 2.0 เว้นแต่จะระบุไว้เป็นอย่างอื่น โปรดดูรายละเอียดที่นโยบายเว็บไซต์ Google Developers Java เป็นเครื่องหมายการค้าจดทะเบียนของ Oracle และ/หรือบริษัทในเครือ
อัปเดตล่าสุด 2025-07-25 UTC
[null,null,["อัปเดตล่าสุด 2025-07-25 UTC"],[[["\u003cp\u003eEarth Engine utilizes the \u003ccode\u003eee.Array\u003c/code\u003e type to represent vectors, matrices, cubes, and higher-dimensional hypercubes, offering a flexible but potentially less scalable data structure compared to other options.\u003c/p\u003e\n"],["\u003cp\u003eThe dimension of an array signifies the number of axes, with 0-D representing scalars, 1-D vectors, 2-D matrices, 3-D cubes, and beyond 3-D hypercubes.\u003c/p\u003e\n"],["\u003cp\u003eAn array's shape is defined by the lengths of its axes, while the total size is the product of these lengths, with each position containing a valid number due to the lack of support for sparse or ragged arrays.\u003c/p\u003e\n"]]],[],null,["Earth Engine represents 1-D vectors, 2-D matrices, 3-D cubes, and higher dimensional\nhypercubes with the `ee.Array` type. Arrays are a flexible data structure, but\nin exchange for the power they offer, they do not scale as well as other data structures\nin Earth Engine. If the problem can be solved without using arrays, the result will be\ncomputed faster and more efficiently. But if the problem requires a higher dimension model,\nflexible linear algebra, or anything else arrays are uniquely suited to, you can use\nthe `Array` class.\n\nArray dimension, shape and size\n\nThe dimension of an array refers to the number of axes along which the underlying data\nvaries. For example, 0-D arrays are scalar numbers, 1-D arrays are vectors, 2-D arrays\nare matrices, 3-D arrays are cubes, and \\\u003e3-D arrays are hyper-cubes. For an\nN-dimensional array, there are N axes from 0 to N-1. The shape of the array is\ndetermined by the lengths of the axes. The length of an axis is the number of positions\nalong it. The array size, or number of total elements in the array, equals the product\nof the axis lengths. Each value at every position on every axis must have a valid number,\nsince sparse or ragged arrays are not currently supported. The array's element type\nindicates what kind of number each element is; all elements of the array will have the\nsame type."]]