Beispiel #1
0
def test_minimum_clearance_nonexistent():
    actual = pygeos.minimum_clearance([point, empty])
    assert np.isinf(actual).all()
Beispiel #2
0
def test_minimum_clearance_missing():
    actual = pygeos.minimum_clearance(None)
    assert np.isnan(actual)
Beispiel #3
0
def test_minimum_clearance():
    actual = pygeos.minimum_clearance(
        [polygon, polygon_with_hole, multi_polygon])
    assert_allclose(actual, [2.0, 2.0, 0.1])