Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add groundwater level property to cpt #296

Merged
merged 2 commits into from
Mar 9, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions src/pygef/bore.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ class BoreData:
bro_id (str | None): BRO ID of the BHRgt.
research_report_date (date): research report date
delivered_location (Location): delivered location in EPSG:28992 - RD new
groundwater_level (float | None): groundwater level
standardized_location (Location | None): standardized location in EPSG:4326 - WGS 84
delivered_vertical_position_offset (float | None): delivered vertical position offset
delivered_vertical_position_datum (str): research delivered vertical position datum
Expand All @@ -34,6 +35,7 @@ class BoreData:
research_report_date: date
description_procedure: str
delivered_location: Location
groundwater_level: float | None
standardized_location: Location | None
delivered_vertical_position_offset: float | None
delivered_vertical_position_datum: str
Expand Down
5 changes: 5 additions & 0 deletions src/pygef/broxml/parse_bore.py
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,11 @@
"resolver": resolvers.parse_date,
"el-attr": "text",
},
"groundwater_level": {
"xpath": "./boring/bhrgtcom:groundwaterLevel",
"resolver": resolvers.parse_float,
"el-attr": "text",
},
"description_procedure": {
"xpath": "./boreholeSampleDescription/bhrgtcom:descriptionProcedure",
"el-attr": "text",
Expand Down
5 changes: 5 additions & 0 deletions src/pygef/broxml/parse_cpt.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,11 @@
"resolver": resolvers.parse_quality_class,
"el-attr": "text",
},
"groundwater_level": {
"xpath": "./additionalInvestigation/cptcommon:groundwaterLevel",
"resolver": resolvers.parse_float,
"el-attr": "text",
},
"predrilled_depth": {
"xpath": "./conePenetrometerSurvey/cptcommon:trajectory/cptcommon:predrilledDepth",
"resolver": resolvers.parse_float,
Expand Down
2 changes: 2 additions & 0 deletions src/pygef/cpt.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ class CPTData:
quality_class (QualityClass): quality class
predrilled_depth (float): predrilled depth
final_depth (float): final depth
groundwater_level (float | None): groundwater level
cpt_description (str): cpt description
cpt_type (str): cpt type
cone_surface_area (int): cone_surface_area
Expand Down Expand Up @@ -76,6 +77,7 @@ class CPTData:
quality_class: QualityClass
predrilled_depth: float
final_depth: float
groundwater_level: float | None
# conepenetrometer
cpt_description: str
cpt_type: str
Expand Down
2 changes: 2 additions & 0 deletions src/pygef/shim.py
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,7 @@ def gef_cpt_to_cpt_data(gef_cpt: _GefCpt) -> CPTData:
kwargs["data"] = gef_cpt.df
kwargs["research_report_date"] = None
kwargs["cpt_standard"] = None
kwargs["groundwater_level"] = gef_cpt.groundwater_level
kwargs["dissipationtest_performed"] = None
kwargs["quality_class"] = QualityClass(gef_cpt.cpt_class)
kwargs["predrilled_depth"] = gef_cpt.pre_excavated_depth
Expand Down Expand Up @@ -173,6 +174,7 @@ def gef_bore_to_bore_data(gef_bore: _GefBore) -> BoreData:
)
kwargs["standardized_location"] = None
kwargs["bro_id"] = gef_bore.project_id
kwargs["groundwater_level"] = None
kwargs["research_report_date"] = None
kwargs["description_procedure"] = "unknown"
kwargs["delivered_vertical_position_offset"] = gef_bore.zid
Expand Down
1 change: 1 addition & 0 deletions tests/test_shim.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ def test_gef_to_cpt_data(_type, cpt_gef_1, cpt_gef_1_bytes, cpt_gef_1_string) ->
"cone_to_friction_sleeve_surface_quotient": 1.0,
"cpt_description": "",
"cpt_standard": None,
"groundwater_level": None,
"cpt_type": 4.0,
"data": (999, 12),
"delivered_vertical_position_datum": 31000.0,
Expand Down