def test_compute_offset(): expected_x = 25196 expected_y = 27339 actual = geods.compute_offset(TRANSFORM, 3629916.385801, 2316502.956137) assert actual[0] == expected_x assert actual[1] == expected_y
def test_compute_offset_np(): expected_x = np.array([24000, 24311, 24622, 24933, 25244, 25555, 25866, 26177, 26488, 26800]) expected_y = np.array([29600, 29244, 28888, 28533, 28177, 27822, 27466, 27111, 26755, 26400]) actual = geods.compute_offset(TRANSFORM, np.linspace(3600000., 3670000., 10), np.linspace(2260000., 2340000., 10)) for exp_x, exp_y, act_x, act_y in zip(expected_x, expected_y, actual[0], actual[1]): assert act_x == exp_x assert act_y == exp_y