def test_spatialOverlap_PolygonAndPoint(): total = spatialSimilarity.spatialOverlap( [13.0078125, 50.62507306341435, 5.44921875, 45.82879925192134], [13.0082125, 50.62513301341435, 13.0082125, 50.62513301341435]) assert total == 0.0
def test_spatialOverlap_Points(): total = spatialSimilarity.spatialOverlap( [13.0078125, 50.62507306341435, 13.0078125, 50.62507306341435], [13.0082125, 50.62513301341435, 13.0082125, 50.62513301341435]) assert total == 81.45
def test_spatialOverlap_LineAndPoint(): total = spatialSimilarity.spatialOverlap( [11.0078125, 50.62507306341435, 13.0078125, 50.62507306341435], [13.0082125, 50.62513301341435, 13.0082125, 50.62513301341435]) assert total == 0.09
def test_spatialOverlap_SSBBTACT(): total = spatialSimilarity.spatialOverlap( [7.596703, 51.950402, 7.656441, 51.978536], [7.588205, 51.952412, 7.616014, 51.967644]) assert total == 17.5
def test_spatialOverlap_fABB(): total = spatialSimilarity.spatialOverlap( [7.596703, 51.950402, 7.656441, 51.978536], [-96.800194, 32.760085, -96.796353, 32.761385]) assert total == 0.0
def test_spatialOverlap_Geometry(): total = spatialSimilarity.spatialOverlap( [13.0078125, 50.62507306341435, 5.44921875, 45.82879925192134], [17.7978515625, 52.09300763963822, 7.27294921875, 46.14939437647686]) assert total == 41.26
def test_spatialOverlap_SameBoundingBox(): total = spatialSimilarity.spatialOverlap( [0.439453, 29.688053, 3.911133, 31.765537], [0.439453, 29.688053, 3.911133, 31.765537]) assert total == 100.0
def test_spatialOverlap_SameBoundingBox(): total = spatialSimilarity.spatialOverlap([0.439453, 29.688053, 3.911133, 31.765537], [ 0.439453, 29.688053, 3.911133, 31.765537]) assert math.floor(total * 100)/100 == 1.0
def test_spatialOverlap_Points(): total = spatialSimilarity.spatialOverlap([13.0078125, 50.62507306341435, 13.0078125, 50.62507306341435], [ 13.0082125, 50.62513301341435, 13.0082125, 50.62513301341435]) assert math.floor(total * 100)/100 == 0.96
def test_spatialOverlap_SSBBTACT(): total = spatialSimilarity.spatialOverlap([7.596703, 51.950402, 7.656441, 51.978536], [ 7.588205, 51.952412, 7.616014, 51.967644]) assert math.floor(total * 100)/100 == 0.17