0

如何从一组 xy 坐标中找到中心点?我有许多图像地图存储在数据库中。我想找到每个的中心点,以便我可以移动图像以对应于选定的地图。下面是我拥有的坐标的一个例子。这可能吗?

谢谢

1638,3227,1637,3221,1648,3210,1653,3213,1657,3208,1663,3216,1668,3218,1670,3220,1668,3226,1680,3230,1681,3237,1689,3236,1690,3240,1703,3244,1703,3249,1707,3249,1710,3255,1708,3257,1713,3264,1713,3281,1727,3285,1736,3293,1733,3301,1736,3306,1731,3317,1733,3322,1719,3318,1712,3323,1704,3313,1691,3313,1688,3318,1692,3325,1683,3340,1680,3342,1677,3337,1660,3334,1656,3337,1659,3347,1648,3358,1648,3362,1656,3368,1648,3374,1640,3373,1635,3367,1638,3362,1633,3361,1631,3354,1631,3354,1620,3356,1613,3370,1610,3367,1606,3369,1606,3382,1604,3385,1604,3385,1607,3390,1602,3397,1607,3403,1603,3401,1595,3410,1583,3411,1583,3408,1586,3404,1576,3392,1579,3387,1581,3383,1586,3375,1583,3375,1580,3376,1577,3375,1577,3371,1579,3370,1580,3360,1585,3356,1592,3353,1592,3348,1596,3345,1605,3348,1608,3339,1605,3334,1607,3331,1603,3328,1599,3331,1594,3327,1585,3336,1581,3325,1569,3329,1565,3327,1568,3322,1567,3313,1565,3308,1558,3305,1559,3299,1569,3296,1571,3290,1577,3287,1581,3274,1576,3264,1584,3262,1595,3272,1598,3269,1608,3260,1612,3262,1614,3259,1624,3264,1630,3254,1621,3245,1625,3243,1629,3233,1638,3227
4

1 回答 1

0

我认为这是一个类似的问题:找到不规则形状多边形中心的最快方法是什么?

或者也许可以在维基百科上尝试这篇文章并自己做:Centroid

于 2013-01-11T11:18:22.750 回答