ee.Geometry.Point.convexHull

מחזירה את הקמור של הצורה הגיאומטרית הנתונה. הקמור של נקודה אחת הוא הנקודה עצמה, הקמור של נקודות קולינאריות הוא קו, והקמור של כל השאר הוא מצולע. שימו לב: מצולע מנוון שכל הקודקודים שלו נמצאים על אותו קו יניב קטע קו.

שימושהחזרות
Point.convexHull(maxError, proj)גיאומטריה
ארגומנטסוגפרטים
זה: geometryגיאומטריהמחשבת את הקמור של הצורה הגיאומטרית הזו.
maxErrorErrorMargin, ברירת מחדל: nullהכמות המקסימלית של שגיאות שמותרות כשמבצעים הקרנה מחדש.
projתחזית, ברירת מחדל: nullההטלה שבה רוצים לבצע את הפעולה. אם לא מציינים מערכת קואורדינטות, הפעולה תתבצע במערכת קואורדינטות כדורית, והמרחקים הליניאריים יהיו במטרים על פני הכדור.

דוגמאות

עורך הקוד (JavaScript)

// Define a Point object.
var point = ee.Geometry.Point(-122.082, 37.42);

// Apply the convexHull method to the Point object.
var pointConvexHull = point.convexHull({'maxError': 1});

// Print the result to the console.
print('point.convexHull(...) =', pointConvexHull);

// Display relevant geometries on the map.
Map.setCenter(-122.085, 37.422, 15);
Map.addLayer(point,
             {'color': 'black'},
             'Geometry [black]: point');
Map.addLayer(pointConvexHull,
             {'color': 'red'},
             'Result [red]: point.convexHull');

הגדרת Python

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

import ee
import geemap.core as geemap

Colab (Python)

# Define a Point object.
point = ee.Geometry.Point(-122.082, 37.42)

# Apply the convexHull method to the Point object.
point_convex_hull = point.convexHull(maxError=1)

# Print the result.
display('point.convexHull(...) =', point_convex_hull)

# Display relevant geometries on the map.
m = geemap.Map()
m.set_center(-122.085, 37.422, 15)
m.add_layer(point, {'color': 'black'}, 'Geometry [black]: point')
m.add_layer(
    point_convex_hull, {'color': 'red'}, 'Result [red]: point.convexHull'
)
m