Finds the approximate location of the pole of inaccessibility for a given polygon. Based on Vladimir Agafonkin’s polylabel.
找到给定多边形的极点(即离多边形轮廓最远的内部点,但不要与中心点混淆)大致位置。基于Vladimir Agafonkin的polylabel。
New in version 1.6.0
Note: Prior to 1.7 polylabel must be imported from shapely.algorithms.polylabel instead of shapely.ops. 在1.7之前,polylabel必须从shapely.algorithms.polylabel而不是shapely.ops导入。
>>> from shapely.ops import polylabel
>>> polygon = LineString([(0, 0), (50, 200), (100, 100), (20, 50),
... (-100, -20), (-150, -200)]).buffer(100)
>>> label = polylabel(polygon, tolerance=10)
>>> label
<POINT (59.356 121.839)>