-
Notifications
You must be signed in to change notification settings - Fork 3
Create an API to allow any input GI to be mapped to the Bedrock GI Database model #42
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
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Contributor
|
I started working on some ags4 to brdb functionality then noticed this. Where you planning to add that to this as well? (what should I be focusing on so we don't duplicate efforts?) |
…olumns when mapping
JulesBlm
reviewed
Jun 18, 2025
Now that we support 3.10
…ct Python 3.9 -> Python 3.10 upgrade
748ee9f to
a59ab9b
Compare
…unctionality in marimo to disappear
…andling of pandas dtypes
This was referenced Jun 26, 2025
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Split out GI data processing functions that were written for processing AGS (3) data into functions that are applicable to any type of GI data and functions that are only applicable to AGS (3) data.
One of the most important things added to achieve this is the Bedrock GI Mapping.
brgi.mapping_models.BedrockGIMappingis an extensible object model that contains which columns from the original data source should be mapped tobedrock-gespecific columns. Expressed as JSON this would look something like this for AGS 3 data:{ "Project": { "data": { "PROJ_ID": "J3573", "PROJ_NAME": "Project_Name XYZ ", "PROJ_LOC": "Kai Tak, Kowloon City District", "PROJ_CLNT": "ARCHITECTURAL SERVICES DEPARTMENT", "PROJ_CONT": "GAMMON CONSTRUCTION LIMITED", "etc": "..." }, "project_id": "PROJ_ID", "horizontal_crs": "EPSG:2326", "vertical_crs": "EPSG:5738" }, "Location": { "data": { "HOLE_ID": ["BH 1", "BH 2", "..."], "HOLE_TYPE": ["RCG", "RCG", "..."], "HOLE_NATE": [838144.50, 838083.31, "..."], "HOLE_NATN": [820697.61, 820670.84, "..."], "HOLE_GL": [5.97, 5.52, "..."], "HOLE_FDEP": [38.84, 43.55, "..."], "etc": ["...", "...", "..."] }, "location_id_column": "HOLE_ID", "easting_column": "HOLE_NATE", "northing_column": "HOLE_NATN", "ground_level_elevation_column": "HOLE_GL", "depth_to_base_column": "HOLE_FDEP" }, "InSituTests": [ { "table_name": "GEOL", "data": { "HOLE_ID": ["BH 1", "BH 1", "..."], "GEOL_TOP": [0.00, 0.10, "..."], "GEOL_BASE": [0.10, 0.50, "..."], "GEOL_DESC": ["CONCRETE slab.", "Dark grey (N3) and light grey (N7), angular fine to coarse GRAVEL...", "..."], "etc": ["...", "...", "..."] }, "location_id_column": "HOLE_ID", "depth_to_top_column": "GEOL_TOP", "depth_to_base_column": "GEOL_BASE" }, { "table_name": "ISPT", "data": { "HOLE_ID": ["BH 1", "BH 1", "..."], "ISPT_TOP": [12.00, 15.0, "..."], "ISPT_NVAL": [74, 60, "..."], "etc": ["...", "...", "..."] }, "location_id_column": "HOLE_ID", "depth_to_top_column": "ISPT_TOP" }, "etc..." ], "Sample": { "data": { "HOLE_ID": ["BH 1", "BH 1", "..."], "SAMP_TOP": [0.45, 12.00, "..."], "SAMP_REF": ["A", "1", "..."], "SAMP_TYPE": ["D", "SPTLS", "..."], "etc": ["...", "...", "..."] }, "sample_id_column": "f'{SAMP_REF}-{SAMP_TYPE}-{SAMP_TOP}-{HOLE_ID}'", "location_id_column": "HOLE_ID", "depth_to_top_column": "SAMP_TOP" }, "LabTests": [ "We still have to find some HK AGS 3 Lab test data..." ], "Other": [ { "table_name": "ABBR", "data": {} }, { "table_name": "UNIT", "data": {} }, { "table_name": "DICT", "data": {} } ] }The conversion from a
brgi.mapping_models.BedrockGIMappingto abrgi.schemas.BedrockGIDatabaseis then performed using thebrgi.mapper.map_to_brgiu_dbfunction.In addition to the Bedrock GI mapping, several other issues have been addressed
transformtomapor something like that #9Longitude,Latitude,EllipsoidalHeightin theLonLatHeighttable rather than in theLocationtable #16gis_geometry.py->geospatial.py. Simple Feature geometry for the In-Situ Tests and Samples is now interpolated along the 3D LINESTRING of the corresponding GI Location. The 3D LINESTRING of a GI location is for now still assumed to be vertically down, which is to be resolved with issue Support inclined boreholes #43.brgi.db_operations.merge_databasesThis refactoring of the
bedrock-geAPI allows further developments:ags_data_dictionary.json