Skip to content

Commit 059b699

Browse files
committed
Add an example to the map_to_brgi_db function
1 parent 4b7cc58 commit 059b699

File tree

1 file changed

+44
-0
lines changed

1 file changed

+44
-0
lines changed

src/bedrock_ge/gi/mapper.py

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,50 @@ def map_to_brgi_db(brgi_db_mapping: BedrockGIMapping) -> BedrockGIDatabase:
2424
table, validates them against their respective schemas, and constructs the final
2525
BedrockGIDatabase object.
2626
27+
Examples:
28+
```python
29+
from pyproj import CRS
30+
from bedrock_ge.gi.mapping_models import BedrockGIMapping
31+
32+
brgi_db_mapping = BedrockGIMapping(
33+
ProjectTableMapping={
34+
"data": {
35+
"project_name: "Test Project",
36+
"project_description": "Project description. Add more data about the project here if you please."
37+
}
38+
"project_id": "project-1",
39+
"horizontal_crs": CRS("EPSG:2193"),
40+
"vertical_crs": CRS("EPSG:7839"),
41+
},
42+
LocationTableMapping={
43+
"data": location_df,
44+
"location_id_column": "LocationID",
45+
"easting_column": "Easting",
46+
"northing_column": "Northing",
47+
"ground_level_elevation_column": "GroundLevel",
48+
"depth_to_base_column": "FinalDepth",
49+
},
50+
InSituTestTableMapping=[
51+
{
52+
"table_name": "Geol",
53+
"data": geology_df,
54+
"location_id_column": "LocationID",
55+
"depth_to_top_column": "from",
56+
"depth_to_base_column": "to",
57+
},
58+
{
59+
"table_name": "SPT",
60+
"data": spt_df,
61+
"location_id_column": "LocationID",
62+
"depth_to_top"column": "from",
63+
}
64+
],
65+
SampleTableMapping=None,
66+
LabTestTableMapping=[],
67+
OtherTable=[],
68+
)
69+
```
70+
2771
Args:
2872
brgi_db_mapping (BedrockGIDatabaseMapping): The mapping object containing GI
2973
data and metadata for mapping to Bedrock's schema.

0 commit comments

Comments
 (0)