PlaceService.py 文件源码

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

项目:ugc.aggregator 作者: Dreamcatcher-GIS 项目源码 文件源码
def concurrentRequest(self):
        # ???
        envelope=polygon_target.envelope
        bounds=list(envelope.bounds)

        # ????
        bounds[0] -= 0.02
        parts = 4
        # ?????4?????16???
        boundsList = GeoUtil().getBoundsList(bounds, parts)

        threads = []
        for index in range(0, len(boundsList), 1):
            print 'current bounds ...%s ' % index
            subBounds = boundsList[index]

            # ?extent???polygon
            coords=GeoUtil().getPolygonByExtent(subBounds)
            coords=tuple(coords)
            isIntersects=Polygon((coords)).intersects(polygon_target)
            if isIntersects:
                threads.append(gevent.spawn(self.fetchPlace, index, subBounds))
        gevent.joinall(threads)
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号