Skip to content

Commit 394ad9a

Browse files
fix(parsing): add missing height_system values
Co-authored-by: paul <[email protected]>
1 parent 508186b commit 394ad9a

File tree

3 files changed

+11
-2
lines changed

3 files changed

+11
-2
lines changed

src/pygef/broxml/resolvers.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -227,6 +227,12 @@ def parse_local_vertical_reference_point_class(
227227
return VerticalDatumClass.MSL
228228
if val == "lat":
229229
return VerticalDatumClass.LAT
230+
if val == "ocs":
231+
return VerticalDatumClass.OCS
232+
if val == "gcs":
233+
return VerticalDatumClass.GCS
234+
if val == "spcs":
235+
return VerticalDatumClass.SPCS
230236
warn(f"vertical datum class '{val}' is unknown")
231237
return VerticalDatumClass.Unknown
232238

src/pygef/common.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,9 @@ class VerticalDatumClass(Enum):
4545
MSL = "49000" # Mean Sea Level
4646
LAT = "00001" # Lowest Astronomical Tide
4747
TAW = "32001" # (GEF)
48+
OCS = "00000" # Own Coordinate System
49+
GCS = "00001" # Geographic Coordinate System
50+
SPCS = "01000" # SPCS
4851

4952

5053
def assign_multiple_columns(

src/pygef/shim.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ def convert_height_system_to_vertical_datum(height_system: float) -> str:
8989
if height_system == 31000.0:
9090
return "nap"
9191
else:
92-
return str(int(height_system))
92+
return f"{int(height_system):05d}"
9393

9494

9595
def gef_cpt_to_cpt_data(gef_cpt: _GefCpt) -> CPTData:
@@ -171,7 +171,7 @@ def gef_cpt_to_cpt_data(gef_cpt: _GefCpt) -> CPTData:
171171
)
172172
kwargs["delivered_vertical_position_offset"] = gef_cpt.zid
173173
kwargs["delivered_vertical_position_datum"] = VerticalDatumClass(
174-
str(int(gef_cpt.height_system))
174+
f"{int(gef_cpt.height_system):05d}"
175175
)
176176

177177
# TODO! parse measurementtext 9 in gef?

0 commit comments

Comments
 (0)