ee.FeatureCollection.bounds

Constructs a bounding box around the geometries in a collection.

שימושהחזרות
FeatureCollection.bounds(maxError, proj)גיאומטריה
ארגומנטסוגפרטים
זה: collectionFeatureCollectionהאוסף שייבנו הגבולות שלו.
maxErrorErrorMargin, אופציונליהכמות המקסימלית של שגיאות שמותרות כשמבצעים הקרנה מחדש.
projתחזית, אופציונליאם מציינים הקרנה, התוצאה תהיה בהקרנה הזו. אחרת, הוא יהיה ב-EPSG:4326.

דוגמאות

עורך הקוד (JavaScript)

// FeatureCollection of power plants in Belgium.
var fc = ee.FeatureCollection('WRI/GPPD/power_plants')
             .filter('country_lg == "Belgium"');

print('Bounds of Belgium power plants:', fc.bounds());  // ee.Geometry

הגדרת Python

מידע על Python API ועל שימוש ב-geemap לפיתוח אינטראקטיבי מופיע בדף Python Environment.

import ee
import geemap.core as geemap

Colab (Python)

# FeatureCollection of power plants in Belgium.
fc = ee.FeatureCollection('WRI/GPPD/power_plants').filter(
    'country_lg == "Belgium"')

print('Bounds of Belgium power plants:', fc.bounds().getInfo())  # ee.Geometry