تنظيم صفحاتك في مجموعات
يمكنك حفظ المحتوى وتصنيفه حسب إعداداتك المفضّلة.
تعرض هذه الدالة نقطة في وسط مكوّنات الشكل الهندسي ذات الأبعاد الأعلى. يتم تجاهل المكوّنات ذات الأبعاد الأقل، لذا فإنّ مركز الثقل لشكل هندسي يحتوي على مضلّعين وثلاثة خطوط ونقطة يساوي مركز الثقل لشكل هندسي يحتوي على المضلّعين فقط.
الاستخدام
المرتجعات
Geometry.centroid(maxError, proj)
هندسة
الوسيطة
النوع
التفاصيل
هذا: geometry
هندسة
تحسب هذه الدالة مركز الشكل الهندسي.
maxError
ErrorMargin، القيمة التلقائية: null
الحدّ الأقصى لمقدار الخطأ المسموح به عند إجراء أي عملية إعادة إسقاط ضرورية.
proj
التوقّع، القيمة التلقائية: null
إذا تم تحديدها، ستكون النتيجة في هذا العرض. وإلا سيكون بتنسيق EPSG:4326.
تاريخ التعديل الأخير: 2025-07-26 (حسب التوقيت العالمي المتفَّق عليه)
[[["يسهُل فهم المحتوى.","easyToUnderstand","thumb-up"],["ساعَدني المحتوى في حلّ مشكلتي.","solvedMyProblem","thumb-up"],["غير ذلك","otherUp","thumb-up"]],[["لا يحتوي على المعلومات التي أحتاج إليها.","missingTheInformationINeed","thumb-down"],["الخطوات معقدة للغاية / كثيرة جدًا.","tooComplicatedTooManySteps","thumb-down"],["المحتوى قديم.","outOfDate","thumb-down"],["ثمة مشكلة في الترجمة.","translationIssue","thumb-down"],["مشكلة في العيّنات / التعليمات البرمجية","samplesCodeIssue","thumb-down"],["غير ذلك","otherDown","thumb-down"]],["تاريخ التعديل الأخير: 2025-07-26 (حسب التوقيت العالمي المتفَّق عليه)"],[[["Returns a central point based on the highest-dimension components of a geometry, ignoring lower dimensions."],["`centroid()` can be applied to a Geometry object to compute its center point."],["Optional parameters `maxError` and `proj` control reprojection tolerance and output projection, respectively."],["The default projection for the returned centroid is EPSG:4326 if `proj` is not specified."]]],["The `Geometry.centroid()` method calculates the center point of the highest-dimensional components within a geometry, ignoring lower-dimensional parts. It accepts `maxError` for error tolerance during reprojection and `proj` to specify the output projection (defaulting to EPSG:4326). The method returns a `Geometry` object. Example usage in JavaScript and Python demonstrates defining a polygon geometry, finding its centroid, and displaying both on a map.\n"]]