pyufunc.create_circle_at_point_with_radius#
- pyufunc.create_circle_at_point_with_radius(point, radius, options=None, verbose=False)#
Generate a polygon by the center point and radius.
- Parameters:
point (shapely.geometry.Point, Iterable[float]) – the center point with format [longitude, latitude]
radius (float) – the radius of the circle, unit is meter
options (dict, optional) –
set the circle options. Defaults to {“edges”: 32, “bearing”: 0, “direction”: 1}.
edges (int, optional): the edges of the polygon. Defaults to 32.
bearing (float, optional): the bearing of the polygon. Defaults to 0.
direction (int, optional): the direction of the polygon. Defaults to 1.
verbose (bool, optional) – print the log information. Defaults to False.
- Returns:
the polygon in geojson format
- Return type:
Example
>>> point_to_circle([173.283966, -41.270634], 1000) {'type': 'Polygon', 'coordinates': [[111.9356, 33.42434831528412], [111.93539001956194, 33.42433105423093], [111.9351881087969, 33.424279934424106], [111.93500202722797, 33.42419692042648], [111.93483892600284, 33.424085202505225], [111.93470507305837, 33.42394907401863], [111.93460561223992, 33.4237937664093], [111.93454436563354, 33.423625248147346], [111.9345236867064, 33.423449995352435], [111.93454436989548, 33.42327474291128], [111.93460562011492, 33.4231062256568], [111.93470508334758, 33.42295091955525], [111.93483893713979, 33.422814792847205], [111.93500203751717, 33.4227030767045], [111.93518811667192, 33.422620064214655], [111.93539002382387, 33.42256894541529], [111.9356, 33.422551684715884], [111.9358099761761, 33.42256894541529], [111.93601188332806, 33.422620064214655], [111.93619796248281, 33.4227030767045], [111.93636106286019, 33.422814792847205], [111.93649491665239, 33.42295091955525], [111.93659437988505, 33.4231062256568], [111.93665563010453, 33.42327474291128], [111.9366763132936, 33.423449995352435], [111.93665563436643, 33.423625248147346], [111.93659438776005, 33.4237937664093], [111.9364949269416, 33.42394907401863], [111.93636107399713, 33.424085202505225], [111.936197972772, 33.42419692042648], [111.93601189120308, 33.424279934424106], [111.93580998043805, 33.42433105423093], [111.9356, 33.42434831528412]]}