当前位置: 首页>>代码示例>>Python>>正文


Python Bbox.Bbox类代码示例

本文整理汇总了Python中src.base.Bbox.Bbox的典型用法代码示例。如果您正苦于以下问题:Python Bbox类的具体用法?Python Bbox怎么用?Python Bbox使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。


在下文中一共展示了Bbox类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。

示例1: _get_bbox_by_tiles

 def _get_bbox_by_tiles(tiles):
     numRows = len(tiles)
     numCols = len(tiles[0])
     first = tiles[0][0]
     last = tiles[numRows -1][numCols -1]
     bbox = Bbox.from_leftdown_rightup(first.bbox.node_leftdown(), last.bbox.node_rightup())
     return bbox
开发者ID:stoneyv,项目名称:OSM-Crosswalk-Detection,代码行数:7,代码来源:TileLoader.py

示例2: test_instantiate_from_bltr

 def test_instantiate_from_bltr(self):
     bottom = 47.0
     left = 8.0
     top = 48.0
     right = 9.0
     bbox = Bbox.from_bltr(bottom, left, top, right)
     self.assertTrue(bbox.bottom == bottom)
     self.assertTrue(bbox.left == left)
     self.assertTrue(bbox.top == top)
     self.assertTrue(bbox.right == right)
开发者ID:stoneyv,项目名称:OSM-Crosswalk-Detection,代码行数:10,代码来源:testBbox.py

示例3: test_instantiate_from_bltr_string

 def test_instantiate_from_bltr_string(self):
     bottom = '47.0'
     left = '8.0'
     top = '48.0'
     right = '9.0'
     bbox = Bbox.from_bltr(bottom, left, top, right)
     self.assertTrue(bbox.bottom == bottom)
     self.assertTrue(bbox.left == left)
     self.assertTrue(bbox.top == top)
     self.assertTrue(bbox.right == right)
开发者ID:stoneyv,项目名称:OSM-Crosswalk-Detection,代码行数:10,代码来源:testBbox.py

示例4: _generate_small_bboxes

    def _generate_small_bboxes(self):
        mminx, mminy = self.mercator.LatLonToMeters(self.big_bbox.bottom, self.big_bbox.left)
        rows = self._calc_rows()
        columns = self._calc_columns()
        side = Constants.SMALL_BBOX_SIDE_LENGHT

        for x in range(0, columns):
            for y in range(0, rows):
                bottom, left = self.mercator.MetersToLatLon(mminx + (side * x), mminy + (side * y))
                top, right = self.mercator.MetersToLatLon(mminx + (side * (x + 1)), mminy + (side * (y + 1)))
                small_bbox = Bbox.from_lbrt(left, bottom, right, top)
                self.small_bboxes.append(small_bbox)
开发者ID:stoneyv,项目名称:OSM-Crosswalk-Detection,代码行数:12,代码来源:Manager.py

示例5: getTile_byNode

    def getTile_byNode(self, centreNode, side_length):
        centrePixel = self.get_pixel(centreNode)
        x1 = centrePixel[0] - side_length/2
        x2 = centrePixel[0] + side_length/2
        y1 = centrePixel[1] - side_length/2
        y2 = centrePixel[1] + side_length/2

        img = self.image.crop((x1, y1, x2, y2))
        leftDown = self.getNode((x1,y1))
        rightUp = self.getNode((x2,y2))
        bbox = Bbox.from_leftdown_rightup(leftDown,rightUp)

        return Tile.from_tile(img,bbox)
开发者ID:stoneyv,项目名称:OSM-Crosswalk-Detection,代码行数:13,代码来源:Tile.py

示例6: BernKoeniz

 def BernKoeniz(self):
     return Bbox.from_lbrt(7.406960, 46.920077, 7.415008, 46.924285)
开发者ID:stoneyv,项目名称:OSM-Crosswalk-Detection,代码行数:2,代码来源:testBoxWalker.py

示例7: Zurich2

 def Zurich2(self):
     #Trainset
     return Bbox.from_lbrt(8.530470, 47.366188, 8.537807, 47.372053)
开发者ID:stoneyv,项目名称:OSM-Crosswalk-Detection,代码行数:3,代码来源:testBoxWalker.py

示例8: ChurBhfAltstadt

 def ChurBhfAltstadt(self):
     #TrainSet
     return Bbox.from_lbrt(9.528281, 46.850342, 9.532599, 46.853980)
开发者ID:stoneyv,项目名称:OSM-Crosswalk-Detection,代码行数:3,代码来源:testBoxWalker.py

示例9: BernAltStadt

 def BernAltStadt(self):
     #TrainSet
     return Bbox.from_lbrt(7.444389, 46.947913, 7.448316, 46.949693)
开发者ID:stoneyv,项目名称:OSM-Crosswalk-Detection,代码行数:3,代码来源:testBoxWalker.py

示例10: zh_quartier2

 def zh_quartier2(self):
     return Bbox.from_lbrt(8.520495, 47.369944, 8.523971, 47.372846)
开发者ID:stoneyv,项目名称:OSM-Crosswalk-Detection,代码行数:2,代码来源:testBoxWalker.py

示例11: zh_hardbrucke_test

 def zh_hardbrucke_test(self):
     return Bbox.from_lbrt(8.517822, 47.386440, 8.520540, 47.388008)
开发者ID:stoneyv,项目名称:OSM-Crosswalk-Detection,代码行数:2,代码来源:testBoxWalker.py

示例12: zh1

 def zh1(self):
     return Bbox.from_lbrt(8.522537, 47.375915, 8.526331, 47.376639)
开发者ID:stoneyv,项目名称:OSM-Crosswalk-Detection,代码行数:2,代码来源:testBoxWalker.py

示例13: zh_kilchberg

 def zh_kilchberg(self):
     return Bbox.from_bltr(47.320074, 8.547435, 47.323934, 8.550514)
开发者ID:stoneyv,项目名称:OSM-Crosswalk-Detection,代码行数:2,代码来源:testBoxWalker.py

示例14: zh_zollikon_test_gross

 def zh_zollikon_test_gross(self):
     return Bbox.from_bltr(47.355633, 8.543026, 47.372811, 8.570957)
开发者ID:stoneyv,项目名称:OSM-Crosswalk-Detection,代码行数:2,代码来源:testBoxWalker.py

示例15: Zug_sz

 def Zug_sz(self):
     return Bbox.from_bltr(47.171100, 8.511467, 47.173771, 8.519041)
开发者ID:stoneyv,项目名称:OSM-Crosswalk-Detection,代码行数:2,代码来源:testBoxWalker.py


注:本文中的src.base.Bbox.Bbox类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。