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