ee.FeatureCollection.draw

צביעה של אוסף וקטורים לצורך הצגה חזותית. לא מיועד לשימוש כקלט לאלגוריתמים אחרים.

שימושהחזרות
FeatureCollection.draw(color, pointRadius, strokeWidth)תמונה
ארגומנטסוגפרטים
זה: collectionFeatureCollectionהאוסף לצביעה.
colorמחרוזתמחרוזת הקסדצימלית בפורמט RRGGBB שמציינת את הצבע שבו יש להשתמש לציור התכונות.
pointRadiusמספר שלם, ברירת מחדל: 3הרדיוס בפיקסלים של סמני הנקודות.
strokeWidthמספר שלם, ברירת מחדל: 2הרוחב בפיקסלים של קווים וגבולות של פוליגונים.

דוגמאות

עורך הקוד (JavaScript)

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

// Paint FeatureCollection to an image for visualization.
var fcVis = fc.draw({color: '800080', pointRadius: 5, strokeWidth: 3});
Map.setCenter(4.56, 50.78, 8);
Map.addLayer(fcVis);

הגדרת 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"'
)

# Paint FeatureCollection to an image for visualization.
fc_vis = fc.draw(color='800080', pointRadius=5, strokeWidth=3)
m = geemap.Map()
m.set_center(4.56, 50.78, 8)
m.add_layer(fc_vis)
m