Skip to content

bedrock_ge.gi.write

Makes table names consistent with SQL, GeoPackage and Excel naming conventions by replacing invalid characters and spaces with underscores.

Parameters:

ParameterTypeDefaultDescription
sheet_nameThe original sheet name.

Returns:

A sanitized sheet name with invalid characters and spaces replaced.


Writes a Bedrock GI (geospatial) database to a file. The file type is determined by the driver argument. Possible values are “GPKG” and “EXCEL”.

Parameters:

ParameterTypeDefaultDescription
brgi_dbbedrock_ge.gi.schemas.BedrockGIDatabase | bedrock_ge.gi.schemas.BedrockGIGeospatialDatabaseThe Bedrock GI (geospatial) database.
pathstr | pathlib.PathThe path of the output file.
driverLiteral['EXCEL', 'GPKG']GPKGThe type of the output file. Possible values are “GPKG” and “EXCEL”.

Returns:

Type: None

None


Each DataFrame in the database dictionary will be saved in a separate Excel sheet named after the dictionary keys. This function can be used on any GI database, whether in AGS, Bedrock, or another format.

Parameters:

ParameterTypeDefaultDescription
dict_of_dfsdict[str, pandas.core.frame.DataFrame | geopandas.geodataframe.GeoDataFrame]A dictionary where keys are GI table names and values are DataFrames with GI data.
excel_pathstr | pathlib.PathPath to the output Excel file. Can be provided as a string or Path object.

Returns:

Type: None

None


Writes a dictionary of DataFrames containing Bedrock Ground Investigation data to a GeoPackage file. Each DataFrame will be saved in a separate table named by the keys of the dictionary.

Parameters:

ParameterTypeDefaultDescription
dict_of_dfsdict[str, pandas.core.frame.DataFrame | geopandas.geodataframe.GeoDataFrame]A dictionary where keys are brgi table names and values are pandas
gpkg_pathstr | pathlib.PathThe name of the output GeoPackage file.

Returns:

Type: None

None