def test_similarArea_PolygonAndPoint(): total = spatialSimilarity.similarArea( [13.0078125, 50.62507306341435, 5.44921875, 45.82879925192134], [13.0082125, 50.62513301341435, 13.0082125, 50.62513301341435]) assert total == 0.0
def test_similarArea_Geometry(): total = spatialSimilarity.similarArea( [13.0078125, 50.62507306341435, 5.44921875, 45.82879925192134], [17.7978515625, 52.09300763963822, 7.27294921875, 46.14939437647686]) assert total == 58.98
def test_similarArea_LineAndPoint(): total = spatialSimilarity.similarArea( [11.0078125, 50.62507306341435, 13.0078125, 50.62507306341435], [13.0082125, 50.62513301341435, 13.0082125, 50.62513301341435]) assert total == 100.0
def test_similarArea_SBBTACT(): total = spatialSimilarity.similarArea( [7.596703, 51.950402, 7.656441, 51.978536], [7.588205, 51.952412, 7.616014, 51.967644]) assert total == 25.2
def test_similarArea_fABB(): total = spatialSimilarity.similarArea( [7.596703, 51.950402, 7.656441, 51.978536], [-96.800194, 32.760085, -96.796353, 32.761385]) assert total == 0.42
def test_similarArea_SameBoundingBox(): total = spatialSimilarity.similarArea( [0.439453, 29.688053, 3.911133, 31.765537], [0.439453, 29.688053, 3.911133, 31.765537]) assert total == 100.0
def test_similarArea_SameBoundingBox(): total = spatialSimilarity.similarArea([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_similarArea_LineAndPoint(): total = spatialSimilarity.similarArea([11.0078125, 50.62507306341435, 13.0078125, 50.62507306341435], [ 13.0082125, 50.62513301341435, 13.0082125, 50.62513301341435]) assert math.floor(total * 100)/100 == 0.0
def test_similarArea_fABB(): total = spatialSimilarity.similarArea( [7.596703, 51.950402, 7.656441, 51.978536], [-96.800194, 32.760085, -96.796353, 32.761385]) assert math.floor(total * 10000)/10000 == 0.0032
def test_similarArea_SBBTACT(): total = spatialSimilarity.similarArea([7.596703, 51.950402, 7.656441, 51.978536], [ 7.588205, 51.952412, 7.616014, 51.967644]) assert math.floor(total * 100)/100 == 0.25