Skip to content

Commit

Permalink
Merge pull request #75 from Amsterdam/fix_negative_height
Browse files Browse the repository at this point in the history
fixed  clean_z
  • Loading branch information
manilde authored Apr 4, 2024
2 parents 12ef182 + a353fb9 commit 8929d73
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/metingen/formatters.py
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ def _interpret_meting(meting_raw, format) -> Meting:

def clean_z(z):
# Remove all non-numeric characters
return re.sub("[^.0-9]", "", z)
return re.sub("[^-.0-9]", "", z)

if format == "cor":
hoogtepunt, x, y, z, *_, sigmaz = values
Expand Down
2 changes: 1 addition & 1 deletion tests/metingen/test_formatters.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
@pytest.fixture
def metingencor():
return [
Meting("10389004", x=None, y=None, hoogte=0.7349, sigmaz=0.0003),
Meting("10389004", x=None, y=None, hoogte=-0.7349, sigmaz=0.0003),
Meting("10381107", x=None, y=None, hoogte=1.4840, sigmaz=0.0004),
Meting("10381105", x=None, y=None, hoogte=1.5192, sigmaz=0.0004),
Meting("10381104", x=None, y=None, hoogte=1.5331, sigmaz=0.0004),
Expand Down
2 changes: 1 addition & 1 deletion tests/move3_files/metingen1.cor
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ ELLIPSOID BESSEL_1841
COORDINATES ENH
PHASE 2
$
10389004 120033.6000 487446.1000 0.7349* ---- ---- 0.0003
10389004 120033.6000 487446.1000 -0.7349* ---- ---- 0.0003
10381107 120019.0000 487514.0000 1.4840^ ---- ---- 0.0004
10381105 120009.0000 487518.0000 1.5192^ ---- ---- 0.0004
10381104 120004.0000 487520.0000 1.5331^ ---- ---- 0.0004
Expand Down

0 comments on commit 8929d73

Please sign in to comment.