webserver.py 文件源码

python
阅读 29 收藏 0 点赞 0 评论 0

项目:orbital-cotwo-web 作者: chronos-pramantha 项目源码 文件源码
def on_post(self, req, resp):
        """Handles POST requests"""
        resp.status = falcon.HTTP_200
        # grab 'geojson' from req.context
        data = req.context['geojson']
        # get coordinates from geojson
        coords = spatial.from_list_to_ewkt(
            spatial.coordinates_from_geojson(data)
        )
        print(coords)
        # create the controller view
        controller = Controller(coords)
        # find the areas contained by controller's view and connected points' data
        controller.which_areas_contains_this_polygon()
        # dump the retrieved data
        json = controller.serialize_features_from_database()

        print(str(controller))
        print(json)

        req.context['result'] = json
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号