ee.Blob.string

blob のコンテンツを文字列として返します。

用途戻り値
Blob.string(encoding)文字列
引数タイプ詳細
これ: blobBlob
encoding文字列、デフォルト: nullBLOB のデコードに使用する文字セット エンコード。オプションには、'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())
print(entry.getInfo())  # Point (1.00, 2.00)...
print(entry.get('a_field').getInfo())  # "a demo field"