Metadata-Version: 2.1
Name: package-circle-to-polygon
Version: 0.0.2
Summary: A small example package
Author: leihb
Author-email: leihaibo1992@gmail.com
License: MIT License
Platform: all
Classifier: Intended Audience :: Developers
Classifier: Operating System :: OS Independent
Classifier: Natural Language :: Chinese (Simplified)
Classifier: Programming Language :: Python
Classifier: Programming Language :: Python :: 3.10
Classifier: Topic :: Software Development :: Libraries
License-File: LICENSE

Usage / 使用
--------------------------
transform circle to polygon since geojson does not support circle.
::

    import package_circle_to_polygon as p
    import json

    center = [173.283966, -41.270634] #[lon, lat]
    radius = 200000 #in meters
    coordinates = p.circle_to_polygon(center = center, radius = radius)
    json.dumps(coordinates)
    """
    {
        "type": "Polygon",
        "coordinates": [[[173.283966, -39.47400343176097], [172.8297426608343, -39.50761945331798], [172.39166717580562, -39.607271255365916], [171.98544458449058, -39.76940340765346], [171.62589074038397, -39.98820144316868], [171.3264802848837, -40.255758887782214], [171.09888995216616, -40.56231121046952], [170.9525431282912, -40.89653624994988], [170.894168491739, -41.24591956982946], [170.92739416288478, -41.597181119390946], [171.0524081585746, -41.9367562214545], [171.26572430426506, -42.251319123422796], [171.56009750883513, -42.528331314494025], [171.9246304894919, -42.75659019219929], [172.3451031959859, -42.92674764018193], [172.80453558092947, -43.03176422124745], [173.283966, -43.06726456823905], [173.76339641907052, -43.03176422124745], [174.22282880401409, -42.92674764018193], [174.64330151050808, -42.75659019219929], [175.00783449116483, -42.528331314494025], [175.3022076957349, -42.251319123422796], [175.51552384142542, -41.9367562214545], [175.6405378371152, -41.597181119390946], [175.673763508261, -41.24591956982946], [175.61538887170875, -40.89653624994988], [175.46904204783382, -40.56231121046952], [175.24145171511628, -40.255758887782214], [174.94204125961602, -39.98820144316868], [174.58248741550943, -39.76940340765346], [174.17626482419436, -39.607271255365916], [173.73818933916564, -39.50761945331798], [173.283966, -39.47400343176097]]]
    }
    """
