Skip to content

Commit

Permalink
(re)reverted alway_xy, for output
Browse files Browse the repository at this point in the history
  • Loading branch information
WouterVisscher committed Feb 15, 2024
1 parent 8a69c75 commit 7f06c04
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 8 deletions.
4 changes: 3 additions & 1 deletion src/coordinate_transformation_api/crs_transform.py
Original file line number Diff line number Diff line change
Expand Up @@ -294,7 +294,9 @@ def get_transformer(

# Get available transformer through TransformerGroup
# TODO check/validate if always_xy=True is correct
tfg = transformer.TransformerGroup(s_crs, t_crs, allow_ballpark=False)
tfg = transformer.TransformerGroup(
s_crs, t_crs, allow_ballpark=False, always_xy=True
)

# If everything is 'right' we should always have a transformer
# based on our configured proj.db. Therefor this error.
Expand Down
14 changes: 7 additions & 7 deletions tests/test_transform_endpoint.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,14 +12,14 @@
"128410.0958,445806.4960",
{
"type": "Point",
"coordinates": [52.0, 5.0],
"coordinates": [5.0, 52.0],
},
"EPSG:28992",
"EPSG:4326",
None,
),
(
"52.0,5.0",
"5.0,52.0",
{
"type": "Point",
"coordinates": [128410.0958, 445806.4960],
Expand All @@ -29,7 +29,7 @@
None,
),
(
"52.0,5.0,43",
"5.0,52.0,43",
{
"type": "Point",
"coordinates": [128410.0958, 445806.4960, -0.4754],
Expand Down Expand Up @@ -72,7 +72,7 @@
"78835.84,457831.732,9.724",
{
"type": "Point",
"coordinates": [52.103482881, 4.275510253, 53.122],
"coordinates": [4.275510253, 52.103482881, 53.122],
},
"EPSG:7415",
"EPSG:9754",
Expand Down Expand Up @@ -108,15 +108,15 @@ def test_transform_get(input, expectation, source_crs, target_crs, epoch):
},
{
"type": "Point",
"coordinates": [47.974858137, 3.313687707],
"coordinates": [3.313687707, 47.974858137],
},
"EPSG:28992",
"EPSG:4326",
),
(
{
"type": "Point",
"coordinates": [47.974858137, 3.313687707],
"coordinates": [3.313687707, 47.974858137],
},
{
"type": "Point",
Expand All @@ -138,7 +138,7 @@ def test_transform_get(input, expectation, source_crs, target_crs, epoch):
"features": [
{
"type": "Feature",
"geometry": {"type": "Point", "coordinates": [52, 5, 43]},
"geometry": {"type": "Point", "coordinates": [5, 52, 43]},
"properties": {"prop0": "value0"},
},
{
Expand Down

0 comments on commit 7f06c04

Please sign in to comment.