ee.FeatureCollection.loadBigQueryTable

BigQuery テーブルからデータを読み取り、結果を FeatureCollection として表示します。

用途戻り値
ee.FeatureCollection.loadBigQueryTable(table, geometryColumn)FeatureCollection
引数タイプ詳細
table文字列BigQuery テーブルのパスを「project.dataset.table」形式で指定します。
geometryColumn文字列、デフォルト: nullメインの特徴ジオメトリとして使用する列の名前。指定しない場合、すべての対象物に null ジオメトリが設定されます。

コードエディタ(JavaScript)

// Load stations from the New York Subway System.
var features = ee.FeatureCollection.loadBigQueryTable({
  table: 'bigquery-public-data.new_york_subway.stations',
  geometryColumn: 'station_geom',
});

// Display all relevant features on the map.
Map.setCenter(-73.90, 40.73, 11);
Map.addLayer(features,
             {'color': 'black'},
             'Stations from New York Subway System');

// Print all stations in the "Astoria" line.
var line = features.filter(ee.Filter.eq('line', 'Astoria'));
print(line);
Map.addLayer(line,
             {'color': 'yellow'},
             'Astoria line');

Python の設定

Python API とインタラクティブな開発での geemap の使用については、 Python 環境のページをご覧ください。

import ee
import geemap.core as geemap

Colab(Python)

# Load stations from the New York Subway System.
features = ee.FeatureCollection.loadBigQueryTable(
    table="bigquery-public-data.new_york_subway.stations",
    geometryColumn="station_geom")

# Display all relevant features on the map.
m = geemap.Map()
m.set_center(-73.90, 40.73, 11)
m.add_layer(
    features, {'color': 'black'}, 'Stations from New York Subway System')

# Print all stations in the "Astoria" line.
line = features.filter(ee.Filter.eq('line', 'Astoria'))
display(line)
m.add_layer(line, {'color': 'yellow'}, 'Astoria line')
m