ee.FeatureCollection.loadBigQueryTable

Đọc dữ liệu từ bảng BigQuery và trình bày kết quả dưới dạng FeatureCollection.

Cách sử dụngGiá trị trả về
ee.FeatureCollection.loadBigQueryTable(table, geometryColumn)FeatureCollection
Đối sốLoạiThông tin chi tiết
tableChuỗiĐường dẫn đến bảng BigQuery ở định dạng `project.dataset.table`.
geometryColumnChuỗi, mặc định: rỗngTên của cột sẽ dùng làm hình dạng đặc điểm chính. Nếu bạn không chỉ định, tất cả các đối tượng sẽ có hình học rỗng.

Ví dụ

Trình soạn thảo mã (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');

Thiết lập Python

Hãy xem trang Môi trường Python để biết thông tin về API Python và cách sử dụng geemap để phát triển tương tác.

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