Пример #1
0
def test_relate_pattern():
    g = pygeos.linestrings([(0, 0), (1, 0), (1, 1)])
    polygon = pygeos.box(0, 0, 2, 2)
    assert pygeos.relate(g, polygon) == "11F00F212"
    assert pygeos.relate_pattern(g, polygon, "11F00F212")
    assert pygeos.relate_pattern(g, polygon, "*********")
    assert not pygeos.relate_pattern(g, polygon, "F********")
Пример #2
0
def test_relate_none(g1, g2):
    assert pygeos.relate(g1, g2) is None
Пример #3
0
def test_relate():
    p1 = pygeos.points(0, 0)
    p2 = pygeos.points(1, 1)
    actual = pygeos.relate(p1, p2)
    assert isinstance(actual, str)
    assert actual == "FF0FFF0F2"