Esempio n. 1
0
def test_merge3to2():
    nodes = [TestEntity(1,None,lon=1, lat=1, nodes=0), 
            TestEntity(2,None,lon=1, lat=2, nodes=0),
            TestEntity(3,None,lon=2, lat=2, nodes=0)]
    ways = [TestEntity(1,{"highway":"residential","lanes":"4","lanes:forward":"3"}, nodes=[1,2]),
            TestEntity(2,{"highway":"residential","lanes":"3","lanes:forward":"2"}, nodes=[2,3])]
    _test_nodes(nodes, ways)
Esempio n. 2
0
def testSimpleRoad():
        nodes = [TestEntity(1,None,lon=1, lat=1, nodes=0), 
            TestEntity(2,None,lon=1, lat=1.001, nodes=0),
            TestEntity(3,None,lon=1.001, lat=1.002, nodes=0),
            TestEntity(4,None,lon=1.001, lat=1.003, nodes=0)
            ]
        ways = [TestEntity(1,{"highway":"residential","lanes":"5", "lanes:forward":"3", "lanes:backward":"2","oneway":"no"}, nodes=[1,2,3,4])]
        _test_nodes(nodes, ways)
Esempio n. 3
0
def test_2WayTCrossing3():
    nodes = [TestEntity(1,None,lon=1, lat=1, nodes=0), 
            TestEntity(2,None,lon=1, lat=1.001, nodes=0),
            TestEntity(3,None,lon=1.001, lat=1.001, nodes=0)
            ]
    ways = [TestEntity(1,{"highway":"residential","lanes":"5", "lanes:forward":"2", "lanes:backward":"3","oneway":"no"}, nodes=[2,1]),
            TestEntity(2,{"highway":"residential","lanes":"5", "lanes:forward":"3", "lanes:backward":"2","oneway":"no"}, nodes=[2,3])
            ]
    _test_nodes(nodes, ways)
Esempio n. 4
0
def test_simple3Way2LaneTCrossing():
    nodes = [TestEntity(1,None,lon=1, lat=1, nodes=0), 
            TestEntity(2,None,lon=1, lat=2, nodes=0),
            TestEntity(3,None,lon=2, lat=2, nodes=0),
            TestEntity(4,None,lon=0, lat=2, nodes=0)]
    ways = [TestEntity(1,{"highway":"residential","lanes":"2","turn:lanes:forward":"through"}, nodes=[1,2]),
            TestEntity(2,{"highway":"residential","lanes":"2","turn:lanes:forward":"through"}, nodes=[2,3]),
            TestEntity(3,{"highway":"residential","lanes":"2","turn:lanes:forward":"through"}, nodes=[2,4])]
    _test_nodes(nodes, ways)
Esempio n. 5
0
def test_3WayTCrossing2():
    nodes = [TestEntity(1,None,lon=1, lat=1, nodes=0), 
            TestEntity(2,None,lon=1, lat=1.001, nodes=0),
            TestEntity(3,None,lon=1.001, lat=1.001, nodes=0),
            TestEntity(4,None,lon=0.999, lat=1.001, nodes=0)]
    ways = [TestEntity(1,{"highway":"residential","lanes":"3", "lanes:forward":"2", "lanes:backward":"1","oneway":"no"}, nodes=[1,2]),
            TestEntity(2,{"highway":"residential","lanes":"3", "lanes:forward":"2", "lanes:backward":"1","oneway":"no"}, nodes=[2,3]),
            TestEntity(3,{"highway":"residential","lanes":"3", "lanes:forward":"2", "lanes:backward":"1","oneway":"no"}, nodes=[2,4])]
    _test_nodes(nodes, ways)