ee.ImageCollection
จัดทุกอย่างให้เป็นระเบียบอยู่เสมอด้วยคอลเล็กชัน
บันทึกและจัดหมวดหมู่เนื้อหาตามค่ากำหนดของคุณ
คุณสร้าง ImageCollection ได้จากอาร์กิวเมนต์ต่อไปนี้
- สตริง: ระบบจะถือว่าเป็นชื่อของคอลเล็กชัน
- รายการรูปภาพหรือสิ่งใดก็ตามที่ใช้สร้างรูปภาพได้
- รูปภาพเดียว
- ออบเจ็กต์ที่คำนวณแล้ว - ตีความใหม่เป็นคอลเล็กชัน
การใช้งาน | การคืนสินค้า |
---|
ee.ImageCollection(args) | ImageCollection |
อาร์กิวเมนต์ | ประเภท | รายละเอียด |
---|
args | ComputedObject|Image|List<Object>|String | อาร์กิวเมนต์ของตัวสร้าง |
ตัวอย่าง
โปรแกรมแก้ไขโค้ด (JavaScript)
print('Image collection from a string',
ee.ImageCollection('COPERNICUS/S2_SR').limit(3));
var img1 = ee.Image('COPERNICUS/S2_SR/20170328T083601_20170328T084228_T35RNK');
var img2 = ee.Image('COPERNICUS/S2_SR/20170328T083601_20170328T084228_T35RNL');
var img3 = ee.Image('COPERNICUS/S2_SR/20170328T083601_20170328T084228_T35RNM');
print('Image collection from a list of images',
ee.ImageCollection([img1, img2, img3]));
print('Image collection from a single image',
ee.ImageCollection(img1));
การตั้งค่า Python
ดูข้อมูลเกี่ยวกับ Python API และการใช้ geemap
เพื่อการพัฒนาแบบอินเทอร์แอกทีฟได้ที่หน้า
สภาพแวดล้อม Python
import ee
import geemap.core as geemap
Colab (Python)
print('Image collection from a string:',
ee.ImageCollection('COPERNICUS/S2_SR').limit(3).getInfo())
img1 = ee.Image('COPERNICUS/S2_SR/20170328T083601_20170328T084228_T35RNK')
img2 = ee.Image('COPERNICUS/S2_SR/20170328T083601_20170328T084228_T35RNL')
img3 = ee.Image('COPERNICUS/S2_SR/20170328T083601_20170328T084228_T35RNM')
print('Image collection from a list of images:',
ee.ImageCollection([img1, img2, img3]).getInfo())
print('Image collection from a single image:',
ee.ImageCollection(img1).getInfo())
เนื้อหาของหน้าเว็บนี้ได้รับอนุญาตภายใต้ใบอนุญาตที่ต้องระบุที่มาของครีเอทีฟคอมมอนส์ 4.0 และตัวอย่างโค้ดได้รับอนุญาตภายใต้ใบอนุญาต Apache 2.0 เว้นแต่จะระบุไว้เป็นอย่างอื่น โปรดดูรายละเอียดที่นโยบายเว็บไซต์ Google Developers Java เป็นเครื่องหมายการค้าจดทะเบียนของ Oracle และ/หรือบริษัทในเครือ
อัปเดตล่าสุด 2025-07-25 UTC
[null,null,["อัปเดตล่าสุด 2025-07-25 UTC"],[[["\u003cp\u003e\u003ccode\u003eee.ImageCollection\u003c/code\u003e can be constructed from a variety of inputs, including a string representing a collection name, a list of images, or a single image.\u003c/p\u003e\n"],["\u003cp\u003eUsing a string as input, such as a collection name like 'COPERNICUS/S2_SR', allows you to create an ImageCollection directly from that dataset.\u003c/p\u003e\n"],["\u003cp\u003eWhen providing a list of images or a single image, the \u003ccode\u003eee.ImageCollection\u003c/code\u003e constructor creates a collection containing those specified elements.\u003c/p\u003e\n"],["\u003cp\u003eComputed objects are also valid inputs, and they are reinterpreted as a collection when used to create an \u003ccode\u003eee.ImageCollection\u003c/code\u003e.\u003c/p\u003e\n"]]],[],null,["# ee.ImageCollection\n\n\u003cbr /\u003e\n\nImageCollections can be constructed from the following arguments:\n\n\u003cbr /\u003e\n\n- A string: assumed to be the name of a collection,\n\n- A list of images, or anything that can be used to construct an image.\n\n- A single image.\n\n- A computed object - reinterpreted as a collection.\n\n| Usage | Returns |\n|----------------------------|-----------------|\n| `ee.ImageCollection(args)` | ImageCollection |\n\n| Argument | Type | Details |\n|----------|-----------------------------------------------|----------------------------|\n| `args` | ComputedObject\\|Image\\|List\\\u003cObject\\\u003e\\|String | The constructor arguments. |\n\nExamples\n--------\n\n### Code Editor (JavaScript)\n\n```javascript\nprint('Image collection from a string',\n ee.ImageCollection('COPERNICUS/S2_SR').limit(3));\n\nvar img1 = ee.Image('COPERNICUS/S2_SR/20170328T083601_20170328T084228_T35RNK');\nvar img2 = ee.Image('COPERNICUS/S2_SR/20170328T083601_20170328T084228_T35RNL');\nvar img3 = ee.Image('COPERNICUS/S2_SR/20170328T083601_20170328T084228_T35RNM');\nprint('Image collection from a list of images',\n ee.ImageCollection([img1, img2, img3]));\n\nprint('Image collection from a single image',\n ee.ImageCollection(img1));\n```\nPython setup\n\nSee the [Python Environment](/earth-engine/guides/python_install) page for information on the Python API and using\n`geemap` for interactive development. \n\n```python\nimport ee\nimport geemap.core as geemap\n```\n\n### Colab (Python)\n\n```python\nprint('Image collection from a string:',\n ee.ImageCollection('COPERNICUS/S2_SR').limit(3).getInfo())\n\nimg1 = ee.Image('COPERNICUS/S2_SR/20170328T083601_20170328T084228_T35RNK')\nimg2 = ee.Image('COPERNICUS/S2_SR/20170328T083601_20170328T084228_T35RNL')\nimg3 = ee.Image('COPERNICUS/S2_SR/20170328T083601_20170328T084228_T35RNM')\nprint('Image collection from a list of images:',\n ee.ImageCollection([img1, img2, img3]).getInfo())\n\nprint('Image collection from a single image:',\n ee.ImageCollection(img1).getInfo())\n```"]]