Earth Engine ได้เปิดตัว
ระดับโควต้าที่ไม่ใช่เชิงพาณิชย์เพื่อปกป้องทรัพยากรการประมวลผลที่ใช้ร่วมกันและรับประกันประสิทธิภาพที่เชื่อถือได้สำหรับทุกคน โปรเจ็กต์ที่ไม่ใช่เชิงพาณิชย์จะใช้ระดับชุมชนโดยค่าเริ่มต้น แต่คุณสามารถเปลี่ยนระดับของโปรเจ็กต์ได้ทุกเมื่อ
Google uses AI technology to translate content into your preferred language. AI translations can contain errors.
ee.Blob.string
จัดทุกอย่างให้เป็นระเบียบอยู่เสมอด้วยคอลเล็กชัน
บันทึกและจัดหมวดหมู่เนื้อหาตามค่ากำหนดของคุณ
แสดงผลเนื้อหาของ Blob เป็นสตริง
| การใช้งาน | การคืนสินค้า |
|---|
Blob.string(encoding) | สตริง |
| อาร์กิวเมนต์ | ประเภท | รายละเอียด |
|---|
blob | Blob | |
encoding | สตริง ค่าเริ่มต้น: null | การเข้ารหัสชุดอักขระที่จะใช้เมื่อถอดรหัส Blob ตัวเลือกต่างๆ ได้แก่ แต่ไม่จำกัดเพียง - `US-ASCII`
- `UTF-8`
- `UTF-16`
|
ตัวอย่าง
ตัวแก้ไขโค้ด (JavaScript)
// Parse a SpatioTemporal Asset Catalog (STAC) entry from Google Cloud
// Storage (GCS). This is a non-traditional use of ee.Blob.
var url = 'gs://ee-docs-demos/vector/geojson/point.json';
var blob = ee.Blob(url);
var entry = ee.Dictionary(blob.string().decodeJSON());
print(entry); // Point (1.00, 2.00)...
print(entry.get('a_field')); // "a demo field"
การตั้งค่า Python
ดูข้อมูลเกี่ยวกับ Python API และการใช้ geemap เพื่อการพัฒนาแบบอินเทอร์แอกทีฟได้ที่หน้าสภาพแวดล้อม Python
import ee
import geemap.core as geemap
Colab (Python)
# Parse a SpatioTemporal Asset Catalog (STAC) entry from Google Cloud
# Storage (GCS). This is a non-traditional use of ee.Blob.
url = 'gs://ee-docs-demos/vector/geojson/point.json'
blob = ee.Blob(url)
entry = ee.Dictionary(blob.string().decodeJSON())
display(entry) # Point (1.00, 2.00)...
display(entry.get('a_field')) # "a demo field"
เนื้อหาของหน้าเว็บนี้ได้รับอนุญาตภายใต้ใบอนุญาตที่ต้องระบุที่มาของครีเอทีฟคอมมอนส์ 4.0 และตัวอย่างโค้ดได้รับอนุญาตภายใต้ใบอนุญาต Apache 2.0 เว้นแต่จะระบุไว้เป็นอย่างอื่น โปรดดูรายละเอียดที่นโยบายเว็บไซต์ Google Developers Java เป็นเครื่องหมายการค้าจดทะเบียนของ Oracle และ/หรือบริษัทในเครือ
อัปเดตล่าสุด 2026-04-20 UTC
[null,null,["อัปเดตล่าสุด 2026-04-20 UTC"],[],["The `Blob.string()` method retrieves the content of a blob as a string. It accepts an optional `encoding` argument (defaulting to `null`) to specify the character set for decoding, such as 'US-ASCII', 'UTF-8', or 'UTF-16'. The return type is a String. Example usages demonstrate fetching a JSON file from Google Cloud Storage using this function to get a SpatioTemporal Asset Catalog (STAC) entry as a decoded JSON.\n"]]