با مجموعهها، منظم بمانید
ذخیره و طبقهبندی محتوا براساس اولویتهای شما.
نقطه ای را در مرکز مولفه های با بالاترین بعد هندسه برمی گرداند. مولفههای ابعاد پایینتر نادیده گرفته میشوند، بنابراین مرکز یک هندسه شامل دو چند ضلعی، سه خط و یک نقطه معادل مرکز هندسهای است که فقط شامل دو چندضلعی است.
استفاده
برمی گرداند
Rectangle.centroid ( maxError , proj )
هندسه
استدلال
تایپ کنید
جزئیات
این: geometry
هندسه
مرکز این هندسه را محاسبه می کند.
maxError
ErrorMargin، پیش فرض: null
حداکثر مقدار خطای قابل تحمل هنگام انجام هر گونه بازطراحی ضروری.
proj
Projection، پیش فرض: null
اگر مشخص شود، نتیجه در این طرح خواهد بود. در غیر این صورت در EPSG:4326 خواهد بود.
تاریخ آخرین بهروزرسانی 2025-07-24 بهوقت ساعت هماهنگ جهانی.
[[["درک آسان","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-24 بهوقت ساعت هماهنگ جهانی."],[[["`centroid()` returns a point representing the center of the highest dimension components within a geometry, ignoring lower dimensions."],["The function prioritizes polygons over lines or points when calculating the center."],["It accepts optional `maxError` and `proj` parameters for controlling reprojection and output projection."],["The returned point can be accessed as a Geometry object."]]],["The `centroid` method calculates the center point of a geometry's highest-dimension components, ignoring lower-dimensional ones. It accepts `maxError` to define the tolerated reprojection error and `proj` to specify the output projection; otherwise, it defaults to EPSG:4326. For example, applying `centroid` to a rectangle returns its center point. The method's result, which is a `Geometry` object, can be printed and displayed on a map, as shown in JavaScript and Python code examples.\n"]]