Esempio n. 1
0
def test_transform_from_wgs84():
    expected_x = 3629916.385801
    expected_y = 2316502.956137
    actual = geods.transform_from_wgs84(EPSG3035_WKT, 43.602091, 1.441183)

    assert abs(expected_x - actual[0]) <= EPSILON
    assert abs(expected_y - actual[1]) <= EPSILON
Esempio n. 2
0
def test_transform_from_wgs84_np():
    expected_x = np.array([3596322.69380009, 3604604.56529048, 3612866.96142577, 3621109.83240858, 3629333.12848138,
                           3637536.79992675, 3645720.79706777, 3653885.0702683, 3662029.56993335, 3670154.24650938])
    expected_y = np.array([2264369.22046415, 2273312.7959045, 2282267.55204012, 2291233.45945101, 2300210.48857829,
                           2309198.6097241, 2318197.79305154, 2327208.0085846, 2336229.22620805, 2345261.41566741])
    actual = geods.transform_from_wgs84(EPSG3035_WKT, np.linspace(43.1, 43.9, 10), np.linspace(1.1, 1.9, 10))

    for exp_x, exp_y, act_x, act_y in zip(expected_x, expected_y, actual[0], actual[1]):
        assert abs(exp_x - act_x) <= EPSILON
        assert abs(exp_y - act_y) <= EPSILON