コード例 #1
0
def test_first(node1, node2, default_config):
    manager = Manager(bbox=Bbox.from_nodes(node_left_down=node1,
                                           node_right_up=node2),
                      configuration=default_config)
    manager._generate_small_bboxes()
    assert manager.small_bboxes[0].left == node1.longitude
    assert manager.small_bboxes[0].bottom == node1.latitude
コード例 #2
0
def test_big_bbox(node1, node2):
    manager = Manager(bbox=Bbox.from_nodes(node_left_down=node1, node_right_up=node2))
    length = len(manager.small_bboxes)
    manager._generate_small_bboxes()
    assert manager.small_bboxes[0].left == node1.longitude
    assert manager.small_bboxes[0].bottom == node1.latitude
    assert (manager.small_bboxes[length - 1].right >= node2.longitude
            and manager.small_bboxes[length - 1].right <= node2.longitude + 0.05)
    assert (manager.small_bboxes[length - 1].top >= node2.latitude
            and manager.small_bboxes[length - 1].top <= node2.latitude + 0.05)
コード例 #3
0
ファイル: test_manager.py プロジェクト: yejingxin/OSMDeepOD
def test_big_bbox(node1, node2):
    manager = Manager(bbox=Bbox.from_leftdown_rightup(node1, node2),
                      job_queue_name='dummy')
    length = len(manager.small_bboxes)
    manager._generate_small_bboxes()
    assert manager.small_bboxes[0].left == node1.longitude
    assert manager.small_bboxes[0].bottom == node1.latitude
    assert (manager.small_bboxes[length - 1].right >= node2.longitude and
            manager.small_bboxes[length - 1].right <= node2.longitude + 0.05)
    assert (manager.small_bboxes[length - 1].top >= node2.latitude
            and manager.small_bboxes[length - 1].top <= node2.latitude + 0.05)
コード例 #4
0
ファイル: test_manager.py プロジェクト: zclfly/OSMDeepOD
def test_big_bbox(node1, node2):
    manager = Manager(
        bbox=Bbox.from_nodes(node_left_down=node1, node_right_up=node2))
    length = len(manager.small_bboxes)
    manager._generate_small_bboxes()
    assert manager.small_bboxes[0].left == node1.longitude
    assert manager.small_bboxes[0].bottom == node1.latitude
    assert (manager.small_bboxes[length - 1].right >= node2.longitude and
            manager.small_bboxes[length - 1].right <= node2.longitude + 0.05)
    assert (manager.small_bboxes[length - 1].top >= node2.latitude
            and manager.small_bboxes[length - 1].top <= node2.latitude + 0.05)
コード例 #5
0
ファイル: test_manager.py プロジェクト: yejingxin/OSMDeepOD
def test_first(node1, node2):
    manager = Manager(bbox=Bbox.from_leftdown_rightup(node1, node2),
                      job_queue_name='dummy')
    manager._generate_small_bboxes()
    assert manager.small_bboxes[0].left == node1.longitude
    assert manager.small_bboxes[0].bottom == node1.latitude
コード例 #6
0
def test_first(node1, node2):
    manager = Manager(bbox=Bbox.from_nodes(node_left_down=node1, node_right_up=node2))
    manager._generate_small_bboxes()
    assert manager.small_bboxes[0].left == node1.longitude
    assert manager.small_bboxes[0].bottom == node1.latitude