Skip to content

Conversation

@JoostGevaert
Copy link
Contributor

Related to #49

@JulesBlm
Copy link
Contributor

When creating brgi_geodb I get KeyError: 'LocationID'. bh_location_df.columns returns Index(['HoleID', 'Easting', 'Northing', 'Elevation', 'z_on_terrain', 'Depth'], dtype='object')

WH_cpt_collar.csv shows HoleID,Easting,Northing,Elevation,z_on_terrain,Depth and WH_collar_all.csv shows LocationID,Easting,Northing,GroundLevel,FinalDepth,Phase.

I'm guessing the order of reading the csv in the folder is not deterministic.

@JoostGevaert
Copy link
Contributor Author

A solution could be to create a dictionary with the CSV-paths in it instead of a list

@JulesBlm
Copy link
Contributor

Maybe we can start thinking about a convenience function to read and convert survey CSV files in a configurable manner.
Borehole CSV's follow an informal(?) convention, with collars in one file, survey data in another.
For example, the MacPass mining borehole data set has similar CSV survey data but GroundLevel is named Elevation and Depth_m rather than Depth.

Comment on lines +55 to +64
@app.cell
def _(mo):
nb_dir = mo.notebook_location()
gi_csvs = [
file.name
for file in nb_dir.iterdir()
if (file.is_file() and file.suffix.lower() == ".csv")
]
gi_csvs
return (nb_dir,)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Don't really need this cell anymore but's I think it's nice to see what's actually in the folder.

@JoostGevaert
Copy link
Contributor Author

Shouldn't we fix the #49

When the column name in the data is the same (case insensitive) as one of the Bedrock GI standard column names, writing to a database such as GeoPackage becomes impossible. For the Weka Hills GI data this means that "Easting" & "easting" and "Northing" & "northing" cause a conflict.

issue before merging this PR?

@JoostGevaert JoostGevaert merged commit bb41654 into dev Sep 1, 2025
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants