Duyuru:
15 Nisan 2025'ten önce Earth Engine'i kullanmak için kaydedilen tüm ticari olmayan projelerin Earth Engine erişimini sürdürmek için
ticari olmayan uygunluğu doğrulaması gerekir.
ee.Geometry.Rectangle.convexHull
Koleksiyonlar ile düzeninizi koruyun
İçeriği tercihlerinize göre kaydedin ve kategorilere ayırın.
Belirtilen geometrinin dışbükey gövdesini döndürür. Tek bir noktanın dışbükey gövdesi noktanın kendisidir, doğrusal noktaların dışbükey gövdesi bir çizgidir ve diğer her şeyin dışbükey gövdesi bir poligondur. Tüm köşeleri aynı çizgi üzerinde bulunan dejenere bir çokgenin çizgi segmentiyle sonuçlanacağını unutmayın.
Kullanım | İadeler |
---|
Rectangle.convexHull(maxError, proj) | Geometri |
Bağımsız Değişken | Tür | Ayrıntılar |
---|
bu: geometry | Geometri | Bu geometrinin dışbükey zarfını hesaplar. |
maxError | ErrorMargin, varsayılan: null | Gerekli yeniden projeksiyon işlemleri gerçekleştirilirken tolere edilen maksimum hata miktarı. |
proj | Projeksiyon, varsayılan: null | İşlemin gerçekleştirileceği projeksiyon. Belirtilmemişse işlem küresel bir koordinat sisteminde gerçekleştirilir ve doğrusal mesafeler kürede metre cinsinden olur. |
Örnekler
Kod Düzenleyici (JavaScript)
// Define a Rectangle object.
var rectangle = ee.Geometry.Rectangle(-122.09, 37.42, -122.08, 37.43);
// Apply the convexHull method to the Rectangle object.
var rectangleConvexHull = rectangle.convexHull({'maxError': 1});
// Print the result to the console.
print('rectangle.convexHull(...) =', rectangleConvexHull);
// Display relevant geometries on the map.
Map.setCenter(-122.085, 37.422, 15);
Map.addLayer(rectangle,
{'color': 'black'},
'Geometry [black]: rectangle');
Map.addLayer(rectangleConvexHull,
{'color': 'red'},
'Result [red]: rectangle.convexHull');
Python kurulumu
Python API'si ve etkileşimli geliştirme için geemap
kullanımı hakkında bilgi edinmek üzere
Python Ortamı sayfasına bakın.
import ee
import geemap.core as geemap
Colab (Python)
# Define a Rectangle object.
rectangle = ee.Geometry.Rectangle(-122.09, 37.42, -122.08, 37.43)
# Apply the convexHull method to the Rectangle object.
rectangle_convex_hull = rectangle.convexHull(maxError=1)
# Print the result.
display('rectangle.convexHull(...) =', rectangle_convex_hull)
# Display relevant geometries on the map.
m = geemap.Map()
m.set_center(-122.085, 37.422, 15)
m.add_layer(rectangle, {'color': 'black'}, 'Geometry [black]: rectangle')
m.add_layer(
rectangle_convex_hull,
{'color': 'red'},
'Result [red]: rectangle.convexHull',
)
m
Aksi belirtilmediği sürece bu sayfanın içeriği Creative Commons Atıf 4.0 Lisansı altında ve kod örnekleri Apache 2.0 Lisansı altında lisanslanmıştır. Ayrıntılı bilgi için Google Developers Site Politikaları'na göz atın. Java, Oracle ve/veya satış ortaklarının tescilli ticari markasıdır.
Son güncelleme tarihi: 2025-07-26 UTC.
[null,null,["Son güncelleme tarihi: 2025-07-26 UTC."],[[["\u003cp\u003eReturns the smallest convex Geometry that contains all the points in the input Geometry.\u003c/p\u003e\n"],["\u003cp\u003eAccepts an optional \u003ccode\u003emaxError\u003c/code\u003e parameter for reprojection tolerance and an optional \u003ccode\u003eproj\u003c/code\u003e parameter to define the projection for the operation.\u003c/p\u003e\n"],["\u003cp\u003eThe convex hull of a single point is the point itself; for collinear points, it's a line; otherwise, it's a polygon.\u003c/p\u003e\n"],["\u003cp\u003eDegenerate polygons with all vertices on the same line will result in a line segment output.\u003c/p\u003e\n"]]],[],null,["# ee.Geometry.Rectangle.convexHull\n\nReturns the convex hull of the given geometry. The convex hull of a single point is the point itself, the convex hull of collinear points is a line, and the convex hull of everything else is a polygon. Note that a degenerate polygon with all vertices on the same line will result in a line segment.\n\n\u003cbr /\u003e\n\n| Usage | Returns |\n|-------------------------------------------------|----------|\n| Rectangle.convexHull`(`*maxError* `, `*proj*`)` | Geometry |\n\n| Argument | Type | Details |\n|------------------|----------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| this: `geometry` | Geometry | Calculates the convex hull of this geometry. |\n| `maxError` | ErrorMargin, default: null | The maximum amount of error tolerated when performing any necessary reprojection. |\n| `proj` | Projection, default: null | The projection in which to perform the operation. If not specified, the operation will be performed in a spherical coordinate system, and linear distances will be in meters on the sphere. |\n\nExamples\n--------\n\n### Code Editor (JavaScript)\n\n```javascript\n// Define a Rectangle object.\nvar rectangle = ee.Geometry.Rectangle(-122.09, 37.42, -122.08, 37.43);\n\n// Apply the convexHull method to the Rectangle object.\nvar rectangleConvexHull = rectangle.convexHull({'maxError': 1});\n\n// Print the result to the console.\nprint('rectangle.convexHull(...) =', rectangleConvexHull);\n\n// Display relevant geometries on the map.\nMap.setCenter(-122.085, 37.422, 15);\nMap.addLayer(rectangle,\n {'color': 'black'},\n 'Geometry [black]: rectangle');\nMap.addLayer(rectangleConvexHull,\n {'color': 'red'},\n 'Result [red]: rectangle.convexHull');\n```\nPython setup\n\nSee the [Python Environment](/earth-engine/guides/python_install) page for information on the Python API and using\n`geemap` for interactive development. \n\n```python\nimport ee\nimport geemap.core as geemap\n```\n\n### Colab (Python)\n\n```python\n# Define a Rectangle object.\nrectangle = ee.Geometry.Rectangle(-122.09, 37.42, -122.08, 37.43)\n\n# Apply the convexHull method to the Rectangle object.\nrectangle_convex_hull = rectangle.convexHull(maxError=1)\n\n# Print the result.\ndisplay('rectangle.convexHull(...) =', rectangle_convex_hull)\n\n# Display relevant geometries on the map.\nm = geemap.Map()\nm.set_center(-122.085, 37.422, 15)\nm.add_layer(rectangle, {'color': 'black'}, 'Geometry [black]: rectangle')\nm.add_layer(\n rectangle_convex_hull,\n {'color': 'red'},\n 'Result [red]: rectangle.convexHull',\n)\nm\n```"]]