ee.Geometry.Point.area

مساحت هندسه را برمی‌گرداند. مساحت نقاط و رشته های خط 0 است و مساحت چند هندسه مجموع مساحت اجزای آنهاست (مناطق متقاطع چندین بار شمارش می شوند).

استفاده برمی گرداند
Point. area ( maxError , proj ) شناور
استدلال تایپ کنید جزئیات
این: geometry هندسه ورودی هندسه
maxError ErrorMargin، پیش فرض: null حداکثر مقدار خطای قابل تحمل هنگام انجام هر گونه بازطراحی ضروری.
proj Projection، پیش فرض: null در صورت مشخص شدن، نتیجه در واحدهای سیستم مختصات این طرح خواهد بود. در غیر این صورت به متر مربع خواهد بود.

نمونه ها

ویرایشگر کد (جاوا اسکریپت)

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

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

// Print the result to the console.
print('point.area(...) =', pointArea);

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

راه اندازی پایتون

برای اطلاعات در مورد API پایتون و استفاده از geemap برای توسعه تعاملی به صفحه محیط پایتون مراجعه کنید.

import ee
import geemap.core as geemap

کولب (پایتون)

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

# Apply the area method to the Point object.
point_area = point.area(maxError=1)

# Print the result.
display('point.area(...) =', point_area)

# 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