@@ -15,7 +15,7 @@ def test_parse(self):
15
15
assert location .srid
16
16
17
17
@pytest .mark .parametrize (
18
- "file_name, number_of_locations, ex_e, ex_n, ex_z , kof_srid, proj_srid" ,
18
+ "file_name, number_of_locations, expected_easting, expected_northing, expected_z , kof_srid, proj_srid" ,
19
19
[
20
20
# No transformations
21
21
("tests/data/UTM32_EN.kof" , 1 , 594137.802 , 6589107.923 , 0.000 , 25832 , 25832 ),
@@ -39,15 +39,17 @@ def test_parse(self):
39
39
# Transformation from the source data ETRS89/UTM 32N -> UTM 33 (SRID 25833, SOSI 23)
40
40
("tests/data/Innmålt_UTM32.kof" , 1 , 5696353.09 , 535410.87 , 50.029 , None , 25833 ),
41
41
("tests/data/Innmålt_UTM32.kof" , 1 , 5696353.09 , 535410.87 , 50.029 , 25832 , 25833 ),
42
- # Transformation from the source data ETRS89/UTM 32N -> ED50 UTM 31 (SRID 23031, SOSI 31)
43
- ("tests/data/Innmålt_UTM32.kof" , 1 , 7712335.00 , 680539.85 , 50.029 , None , 23031 ),
44
- ("tests/data/Innmålt_UTM32.kof" , 1 , 7712335.00 , 680539.85 , 50.029 , 25832 , 23031 ),
42
+ # Transformation from the source data ETRS89/UTM 32N -> ED50 UTM 31 (SRID 23031, SOSI 31 NB: 10 m accuracy )
43
+ ("tests/data/Innmålt_UTM32.kof" , 1 , 7712388.471459307 , 680330.5913208205 , 50.029 , None , 23031 ),
44
+ ("tests/data/Innmålt_UTM32.kof" , 1 , 7712388.471459307 , 680330.5913208205 , 50.029 , 25832 , 23031 ),
45
45
("tests/data/15-5-18-Fossegata_linux.kof" , 6 , 6569635.303 , 624579.208 , 73.838 , None , 23031 ),
46
46
("tests/data/15-5-18-Fossegata_windows.kof" , 6 , 6569635.303 , 624579.208 , 73.838 , None , 23031 ),
47
47
("tests/data/KOF_from_ArcGIS.kof" , 131 , 83711.914 , 1193605.427 , 5 , 5110 , 5110 ),
48
48
],
49
49
)
50
- def test_upload_kof_with_proj_and_meta (self , file_name , number_of_locations , ex_e , ex_n , ex_z , kof_srid , proj_srid ):
50
+ def test_upload_kof_with_proj_and_meta (
51
+ self , file_name , number_of_locations , expected_easting , expected_northing , expected_z , kof_srid , proj_srid
52
+ ):
51
53
"""
52
54
Test uploading kof file
53
55
@@ -61,9 +63,9 @@ def test_upload_kof_with_proj_and_meta(self, file_name, number_of_locations, ex_
61
63
assert len (locations ) == number_of_locations
62
64
63
65
location = locations [0 ]
64
- assert location .point_easting == pytest .approx (ex_e )
65
- assert location .point_northing == pytest .approx (ex_n )
66
- assert location .point_z == ex_z
66
+ assert location .point_easting == pytest .approx (expected_easting )
67
+ assert location .point_northing == pytest .approx (expected_northing )
68
+ assert location .point_z == expected_z
67
69
assert location .srid == proj_srid
68
70
69
71
@pytest .mark .parametrize ("file" , ["tests/data/import_template.kof" , open ("tests/data/import_template.kof" , "rb" )])
@@ -105,7 +107,6 @@ def test_upload_kof(self, file):
105
107
assert method == MethodType .PZ .value
106
108
107
109
def test_err_file_containing_tabs (self ):
108
-
109
110
srid = 5110
110
111
parser = KOFParser ()
111
112
0 commit comments