def test_spatialdistance_PolygonAndPoint(): total = spatialSimilarity.spatialDistance( [13.0078125, 50.62507306341435, 5.44921875, 45.82879925192134], [13.0082125, 50.62513301341435, 13.0082125, 50.62513301341435]) assert total == 50.57
def test_spatialdistance_LineAndPoint(): total = spatialSimilarity.spatialDistance( [11.0078125, 50.62507306341435, 13.0078125, 50.62507306341435], [13.0082125, 50.62513301341435, 13.0082125, 50.62513301341435]) assert total == 49.97
def test_spatialdistance_Geometry(): total = spatialSimilarity.spatialDistance( [13.0078125, 50.62507306341435, 5.44921875, 45.82879925192134], [17.7978515625, 52.09300763963822, 7.27294921875, 46.14939437647686]) assert total == 74.02
def test_spatialdistance_fABB(): total = spatialSimilarity.spatialDistance( [7.596703, 51.950402, 7.656441, 51.978536], [-96.800194, 32.760085, -96.796353, 32.761385]) assert total == 0
def test_spatialdistance_Points(): total = spatialSimilarity.spatialDistance( [13.0078125, 50.62507306341435, 13.0078125, 50.62507306341435], [13.0082125, 50.62513301341435, 13.0082125, 50.62513301341435]) assert total == 99.1
def test_spatialdistance_SBBTACT(): total = spatialSimilarity.spatialDistance( [7.596703, 51.950402, 7.656441, 51.978536], [7.588205, 51.952412, 7.616014, 51.967644]) assert total == 66.08
def test_spatialdistance_SameBoundingBox(): total = spatialSimilarity.spatialDistance( [0.439453, 29.688053, 3.911133, 31.765537], [0.439453, 29.688053, 3.911133, 31.765537]) assert total == 100.00
def test_spatialdistance_SBBTACT(): total = spatialSimilarity.spatialDistance([7.596703, 51.950402, 7.656441, 51.978536], [ 7.588205, 51.952412, 7.616014, 51.967644]) assert math.floor(total * 100)/100 == 0.66
def test_spatialdistance_SameBoundingBox(): total = spatialSimilarity.spatialDistance([0.439453, 29.688053, 3.911133, 31.765537], [ 0.439453, 29.688053, 3.911133, 31.765537]) assert math.floor(total * 100)/100 == 1.00
def test_spatialdistance_LineAndPoint(): total = spatialSimilarity.spatialDistance([11.0078125, 50.62507306341435, 13.0078125, 50.62507306341435], [ 13.0082125, 50.62513301341435, 13.0082125, 50.62513301341435]) assert math.floor(total * 100)/100 == 0.49