bedrock-ge 0.2.3__py3-none-any.whl → 0.3.0__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
bedrock_ge/gi/validate.py CHANGED
@@ -1,151 +1,88 @@
1
- from typing import Dict, Union
2
-
3
1
  import geopandas as gpd # type: ignore
4
2
  import pandas as pd
5
3
 
6
4
  from bedrock_ge.gi.schemas import (
7
- BaseInSitu,
8
- BaseLocation,
9
- BaseSample,
10
- InSitu,
11
- Location,
12
- Project,
13
- Sample,
5
+ BedrockGIDatabase,
6
+ BedrockGIGeospatialDatabase,
14
7
  )
15
8
 
16
9
 
17
- # TODO: rename to check_brgi_geodb
18
- # TODO: make this check actually work...
19
- def check_brgi_database(brgi_db: Dict[str, Union[pd.DataFrame, gpd.GeoDataFrame]]):
20
- """Validates the structure and relationships of a 'Bedrock Ground Investigation' (BRGI) database (which is a dictionary of DataFrames).
10
+ def check_brgi_geodb(
11
+ brgi_geodb: BedrockGIGeospatialDatabase,
12
+ ):
13
+ """Validates the structure and relationships of a 'Bedrock Ground Investigation' (BrGI) geospatial database.
21
14
 
22
- This function checks that all tables in the BRGI database conform to their respective schemas
15
+ This function checks that all tables in the BrGI geospatialdatabase conform to their respective schemas
23
16
  and that all foreign key relationships are properly maintained. It validates the following tables:
24
17
  - Project
25
18
  - Location
19
+ - LonLatHeight
20
+ - All In-Situ test tables
26
21
  - Sample
27
- - InSitu_TESTX
28
- - Lab_TESTY (not yet implemented)
22
+ - All Lab test tables
29
23
 
30
24
  Args:
31
- brgi_db (Dict[str, Union[pd.DataFrame, gpd.GeoDataFrame]]): A dictionary
32
- containing the BRGI database tables, where keys are table names and
33
- values are the corresponding data tables (DataFrame or GeoDataFrame).
25
+ brgi_geodb (BedrockGIGeospatialDatabase): Bedrock GI geospatial database object.
34
26
 
35
27
  Returns:
36
- bool: True if all tables are valid and relationships are properly maintained.
28
+ is_valid (bool): True if all tables are valid and relationships are properly maintained.
37
29
 
38
30
  Example:
39
31
  ```python
40
- brgi_db = {
41
- "Project": project_df,
42
- "Location": location_gdf,
43
- "Sample": sample_gdf,
44
- "InSitu_ISPT": in_situ_ispt_gdf,
45
- }
46
- check_brgi_database(brgi_db)
32
+ brgi_geodb = BedrockGIGeospatialDatabase(
33
+ Project=project_df,
34
+ Location=location_geodf,
35
+ LonLatHeight=lon_lat_height_geodf,
36
+ InSituTests={"ISPT": ispt_geodf},
37
+ Sample=sample_geodf,
38
+ LabTests={"LLPL": llpl_df},
39
+ )
40
+ check_brgi_geodb(brgi_db)
47
41
  ```
48
42
  """
49
- for table_name, table in brgi_db.items():
50
- if table_name == "Project":
51
- Project.validate(table)
52
- print("'Project' table aligns with Bedrock's 'Project' table schema.")
53
- elif table_name == "Location":
54
- Location.validate(table)
55
- check_foreign_key("project_uid", brgi_db["Project"], table)
56
- print("'Location' table aligns with Bedrock's 'Location' table schema.")
57
- elif table_name == "Sample":
58
- Sample.validate(table)
59
- check_foreign_key("project_uid", brgi_db["Project"], table)
60
- check_foreign_key("location_uid", brgi_db["Location"], table)
61
- print("'Sample' table aligns with Bedrock's 'Sample' table schema.")
62
- # ! JG is pretty sure that this doesn't work
63
- # ! The line below should be:
64
- # ! elif table_name.startswith("InSitu_"):
65
- elif table_name == "InSitu":
66
- InSitu.validate(table)
67
- check_foreign_key("project_uid", brgi_db["Project"], table)
68
- check_foreign_key("location_uid", brgi_db["Location"], table)
69
- print(
70
- f"'{table_name}' table aligns with Bedrock's table schema for In-Situ measurements."
71
- )
72
- elif table_name.startswith("Lab_"):
73
- print(
74
- "🚨 !NOT IMPLEMENTED! We haven't come across Lab data yet. !NOT IMPLEMENTED!"
75
- )
76
-
43
+ # TODO: implement this
77
44
  return True
78
45
 
79
46
 
80
- # TODO: rename to check_brgi_db
81
- def check_no_gis_brgi_database(
82
- brgi_db: Dict[str, Union[pd.DataFrame, gpd.GeoDataFrame]],
47
+ def check_brgi_db(
48
+ brgi_db: BedrockGIDatabase,
83
49
  ):
84
- """Validates the structure and relationships of a 'Bedrock Ground Investigation' (BGI) database without GIS geometry.
50
+ """Validates the structure and relationships of a 'Bedrock Ground Investigation' (BrGI) database.
85
51
 
86
- This function performs the same validation as `check_brgi_database` but uses schemas
87
- that don't require GIS geometry. It validates the following tables:
88
- - Project (never has GIS geometry)
89
- - Location (without GIS geometry)
90
- - Sample (without GIS geometry)
91
- - InSitu_TESTX (without GIS geometry)
92
- - Lab_TESTY (not yet implemented)
52
+ This function performs the same validation as `check_brgi_geodb`, but uses schemas
53
+ that don't require geospatial geometry. It validates the following tables:
54
+ - Project (never has geospatial geometry)
55
+ - Location (without geospatial geometry)
56
+ - All In-Situ test tables (without geospatial geometry)
57
+ - Sample (without geospatial geometry)
58
+ - All Lab test tables (never has geospatial geometry)
93
59
 
94
60
  Args:
95
- brgi_db (Dict[str, Union[pd.DataFrame, gpd.GeoDataFrame]]): A dictionary
96
- containing the Bedrock GI database tables, where keys are table names
97
- and values are the corresponding data tables (DataFrame or GeoDataFrame).
61
+ brgi_db (BedrockGIDatabase): A Bedrock GI database object.
98
62
 
99
63
  Returns:
100
64
  bool: True if all tables are valid and relationships are properly maintained.
101
65
 
102
66
  Example:
103
67
  ```python
104
- brgi_db = {
105
- "Project": projects_df,
106
- "Location": locations_df,
107
- "Sample": samples_df,
108
- "InSitu_measurements": insitu_df,
109
- }
110
- check_no_gis_brgi_database(brgi_db)
68
+ brgi_db = BedrockGIDatabase(
69
+ Project=project_df,
70
+ Location=location_df,
71
+ InSituTests={"ISPT": ispt_df},
72
+ Sample=sample_df,
73
+ LabTests={"LLPL": llpl_df},
74
+ )
75
+ check_brgi_db(brgi_db)
111
76
  ```
112
77
  """
113
- for table_name, table in brgi_db.items():
114
- if table_name == "Project":
115
- Project.validate(table)
116
- print("'Project' table aligns with Bedrock's 'Project' table schema.")
117
- elif table_name == "Location":
118
- BaseLocation.validate(table)
119
- check_foreign_key("project_uid", brgi_db["Project"], table)
120
- print(
121
- "'Location' table aligns with Bedrock's 'Location' table schema without GIS geometry."
122
- )
123
- elif table_name == "Sample":
124
- BaseSample.validate(table)
125
- check_foreign_key("project_uid", brgi_db["Project"], table)
126
- check_foreign_key("location_uid", brgi_db["Location"], table)
127
- print(
128
- "'Sample' table aligns with Bedrock's 'Sample' table schema without GIS geometry."
129
- )
130
- elif table_name.startswith("InSitu_"):
131
- BaseInSitu.validate(table)
132
- check_foreign_key("project_uid", brgi_db["Project"], table)
133
- check_foreign_key("location_uid", brgi_db["Location"], table)
134
- print(
135
- f"'{table_name}' table aligns with Bedrock's '{table_name}' table schema without GIS geometry."
136
- )
137
- elif table_name.startswith("Lab_"):
138
- print(
139
- "🚨 !NOT IMPLEMENTED! We haven't come across Lab data yet. !NOT IMPLEMENTED!"
140
- )
141
-
78
+ # TODO: implement this
142
79
  return True
143
80
 
144
81
 
145
82
  def check_foreign_key(
146
83
  foreign_key: str,
147
- parent_table: Union[pd.DataFrame, gpd.GeoDataFrame],
148
- table_with_foreign_key: Union[pd.DataFrame, gpd.GeoDataFrame],
84
+ parent_table: pd.DataFrame | gpd.GeoDataFrame,
85
+ table_with_foreign_key: pd.DataFrame | gpd.GeoDataFrame,
149
86
  ) -> bool:
150
87
  """Validates referential integrity between two tables by checking foreign key relationships.
151
88
 
@@ -154,8 +91,8 @@ def check_foreign_key(
154
91
 
155
92
  Args:
156
93
  foreign_key (str): The name of the column that serves as the foreign key.
157
- parent_table (Union[pd.DataFrame, gpd.GeoDataFrame]): The parent table containing the primary keys.
158
- table_with_foreign_key (Union[pd.DataFrame, gpd.GeoDataFrame]): The child table containing the foreign keys.
94
+ parent_table (pd.DataFrame| gpd.GeoDataFrame): The parent table containing the primary keys.
95
+ table_with_foreign_key (pd.DataFrame| gpd.GeoDataFrame): The child table containing the foreign keys.
159
96
 
160
97
  Returns:
161
98
  bool: True if all foreign keys exist in the parent table.
bedrock_ge/gi/write.py CHANGED
@@ -1,13 +1,44 @@
1
1
  from pathlib import Path
2
- from typing import Dict, Union
2
+ from typing import Literal
3
3
 
4
4
  import geopandas as gpd
5
5
  import pandas as pd
6
6
 
7
+ from bedrock_ge.gi.io_utils import brgi_db_to_dfs, geodf_to_df
8
+ from bedrock_ge.gi.schemas import BedrockGIDatabase, BedrockGIGeospatialDatabase
9
+
10
+
11
+ # ? Should this function be made a to_file(s) method of BedrockGIDatabase?
12
+ def write_brgi_db_to_file(
13
+ brgi_db: BedrockGIDatabase | BedrockGIGeospatialDatabase,
14
+ path: str | Path,
15
+ driver: Literal["EXCEL", "GPKG"] = "GPKG",
16
+ ) -> None:
17
+ """Writes a Bedrock GI (geospatial) database to a file.
18
+
19
+ Writes a Bedrock GI (geospatial) database to a file. The file type is
20
+ determined by the `driver` argument. Possible values are "GPKG" and "EXCEL".
21
+
22
+ Args:
23
+ brgi_db (BedrockGIDatabase | BedrockGIGeospatialDatabase): The Bedrock GI (geospatial) database.
24
+ path (str | Path): The path of the output file.
25
+ driver (str): The type of the output file. Possible values are "GPKG" and "EXCEL".
26
+
27
+ Returns:
28
+ None
29
+ """
30
+ dict_of_dfs = brgi_db_to_dfs(brgi_db)
31
+ if driver.upper() == "GPKG":
32
+ write_gi_db_to_gpkg(dict_of_dfs, path)
33
+ elif driver.upper() == "EXCEL":
34
+ write_gi_db_to_excel(dict_of_dfs, path)
35
+ else:
36
+ raise ValueError(f"Invalid driver: {driver}")
37
+
7
38
 
8
39
  def write_gi_db_to_gpkg(
9
- brgi_db: Dict[str, gpd.GeoDataFrame],
10
- gpkg_path: Union[str, Path],
40
+ dict_of_dfs: dict[str, pd.DataFrame | gpd.GeoDataFrame],
41
+ gpkg_path: str | Path,
11
42
  ) -> None:
12
43
  """Writes a database with Bedrock Ground Investigation data to a GeoPackage file.
13
44
 
@@ -16,31 +47,28 @@ def write_gi_db_to_gpkg(
16
47
  separate table named by the keys of the dictionary.
17
48
 
18
49
  Args:
19
- brgi_db (dict): A dictionary where keys are brgi table names and values are DataFrames
50
+ dict_of_dfs (dict[str, pd.DataFrame | gpd.GeoDataFrame]): A dictionary where
51
+ keys are brgi table names and values are pandas DataFrames or GeoDataFrames
20
52
  with brgi data.
21
- gpkg_path (str): The name of the output GeoPackage file.
53
+ gpkg_path (str | Path): The name of the output GeoPackage file.
22
54
 
23
55
  Returns:
24
56
  None
25
57
  """
26
58
  # Create a GeoDataFrame from the dictionary of DataFrames
27
- for sheet_name, brgi_table in brgi_db.items():
28
- sanitized_table_name = sanitize_table_name(sheet_name)
29
-
30
- if isinstance(brgi_table, pd.DataFrame):
31
- brgi_table = gpd.GeoDataFrame(brgi_table)
59
+ for table_name, df in dict_of_dfs.items():
60
+ sanitized_table_name = sanitize_table_name(table_name)
61
+ if isinstance(df, pd.DataFrame):
62
+ df = gpd.GeoDataFrame(df)
32
63
 
33
- if isinstance(brgi_table, gpd.GeoDataFrame):
34
- brgi_table.to_file(
35
- gpkg_path, driver="GPKG", layer=sanitized_table_name, overwrite=True
36
- )
64
+ df.to_file(gpkg_path, driver="GPKG", layer=sanitized_table_name, overwrite=True)
37
65
 
38
66
  print(f"Ground Investigation data has been written to '{gpkg_path}'.")
39
67
 
40
68
 
41
69
  def write_gi_db_to_excel(
42
- gi_db: Dict[str, Union[pd.DataFrame, gpd.GeoDataFrame]],
43
- excel_path: Union[str, Path],
70
+ dict_of_dfs: dict[str, pd.DataFrame | gpd.GeoDataFrame],
71
+ excel_path: str | Path,
44
72
  ) -> None:
45
73
  """Writes a database with Ground Investigation data to an Excel file.
46
74
 
@@ -49,25 +77,27 @@ def write_gi_db_to_excel(
49
77
  AGS, Bedrock, or another format.
50
78
 
51
79
  Args:
52
- gi_dfs (dict): A dictionary where keys are GI table names and values are DataFrames with GI data.
53
- excel_path (str): The name of the output Excel file.
80
+ dict_of_dfs (dict[str, pd.DataFrame | gpd.GeoDataFrame]): A dictionary where
81
+ keys are GI table names and values are DataFrames with GI data.
82
+ excel_path (str | Path): Path to the output Excel file. Can be provided as a
83
+ string or Path object.
54
84
 
55
85
  Returns:
56
86
  None
57
87
  """
58
- # Create an Excel writer object
59
88
  with pd.ExcelWriter(excel_path, engine="openpyxl") as writer:
60
- for sheet_name, df in gi_db.items():
61
- sanitized_sheet_name = sanitize_table_name(sheet_name)
62
- if isinstance(df, pd.DataFrame) or isinstance(df, gpd.GeoDataFrame):
63
- df.to_excel(writer, sheet_name=sanitized_sheet_name, index=False)
89
+ for sheet_name, df in dict_of_dfs.items():
90
+ sanitized_sheet_name = sanitize_table_name(sheet_name)[:31]
91
+ if isinstance(df, gpd.GeoDataFrame):
92
+ df = geodf_to_df(df)
93
+
94
+ df.to_excel(writer, sheet_name=sanitized_sheet_name, index=False)
64
95
 
65
96
  print(f"Ground Investigation data has been written to '{excel_path}'.")
66
97
 
67
98
 
68
- # TODO: Make the 31 character table name length truncation a separate function. Only necessary for Excel.
69
99
  def sanitize_table_name(sheet_name):
70
- """Replaces invalid characters and spaces in GI table names with underscores and truncates to 31 characters.
100
+ """Replaces invalid characters and spaces in GI table names with underscores.
71
101
 
72
102
  Makes table names consistent with SQL, GeoPackage and Excel naming conventions by
73
103
  replacing invalid characters and spaces with underscores.
@@ -76,14 +106,10 @@ def sanitize_table_name(sheet_name):
76
106
  sheet_name (str): The original sheet name.
77
107
 
78
108
  Returns:
79
- sanitized_name: A sanitized sheet name with invalid characters and spaces replaced.
109
+ sanitized_name (str): A sanitized sheet name with invalid characters and spaces replaced.
80
110
  """
81
- # Trim to a maximum length of 31 characters
82
- trimmed_name = sheet_name.strip()[:31]
83
-
84
- # Define invalid characters and replace with underscores
85
111
  invalid_chars = [":", "/", "\\", "?", "*", "[", "]"]
86
- sanitized_name = trimmed_name
112
+ sanitized_name = sheet_name.strip()
87
113
  for char in invalid_chars:
88
114
  sanitized_name = sanitized_name.replace(char, "_")
89
115
 
@@ -93,16 +119,10 @@ def sanitize_table_name(sheet_name):
93
119
  # Collapse multiple underscores to one
94
120
  sanitized_name = "_".join(filter(None, sanitized_name.split("_")))
95
121
 
96
- if trimmed_name != sanitized_name:
122
+ if sheet_name != sanitized_name:
97
123
  print(
98
124
  f"Table names shouldn't contain {invalid_chars} or spaces and shouldn't be longer than 31 characters.\n",
99
125
  f"Replaced '{sheet_name}' with '{sanitized_name}'.",
100
126
  )
101
127
 
102
- # Ensure name isn't empty after sanitization
103
- # ! "Table1" doesn't make a lot of sense?!? It could be that there are more than 1 table without a name...
104
- if not sanitized_name:
105
- sanitized_name = "Table1"
106
- print("The table name was completely invalid or empty. Replaced with 'Table1'.")
107
-
108
128
  return sanitized_name
bedrock_ge/plot.py CHANGED
@@ -1,2 +1,4 @@
1
1
  def hello_plt() -> None:
2
- print("Hello from src/bedrock/plot.py!")
2
+ print(
3
+ "Hi Bedrock engineer! bedrock_ge.plot is a placeholder module for Geotechnical Engineering plots."
4
+ )
@@ -0,0 +1,208 @@
1
+ Metadata-Version: 2.4
2
+ Name: bedrock-ge
3
+ Version: 0.3.0
4
+ Summary: Bedrock's Python library for geotechnical engineering.
5
+ Project-URL: Homepage, https://bedrock.engineer/
6
+ Project-URL: Source, https://github.com/bedrock-engineer/bedrock-ge
7
+ Project-URL: Documentation, https://bedrock.engineer/docs/
8
+ Project-URL: Tracker, https://github.com/bedrock-engineer/bedrock-ge/issues
9
+ Author-email: Bedrock <info@bedrock.engineer>
10
+ License: Apache Software License (Apache 2.0)
11
+ License-File: LICENSE
12
+ Keywords: aec,aeco,ags,ags3,ags4,bedrock,bim,borehole,borehole-data,civil-engineering,engineering-geology,geo-bim,geoscience-bim,geosciences,geospatial,geospatial-data,geostatistics,geotech,geotechnical,geotechnical-data,geotechnical-engineering,geotechnics,gi-data,gis,ground-engineering,ground-investigation,ground-investigation-data,subsurface,underground
13
+ Classifier: Development Status :: 3 - Alpha
14
+ Classifier: Intended Audience :: Education
15
+ Classifier: Intended Audience :: Science/Research
16
+ Classifier: License :: OSI Approved :: Apache Software License
17
+ Classifier: Operating System :: OS Independent
18
+ Classifier: Programming Language :: Python
19
+ Classifier: Programming Language :: Python :: 3 :: Only
20
+ Classifier: Programming Language :: Python :: 3.10
21
+ Classifier: Programming Language :: Python :: 3.11
22
+ Classifier: Programming Language :: Python :: 3.12
23
+ Classifier: Programming Language :: Python :: 3.13
24
+ Classifier: Topic :: Scientific/Engineering
25
+ Classifier: Topic :: Scientific/Engineering :: GIS
26
+ Requires-Python: >=3.10
27
+ Requires-Dist: geopandas~=1.0
28
+ Requires-Dist: openpyxl~=3.0
29
+ Requires-Dist: pandera>=0.23.0
30
+ Requires-Dist: python-ags4~=1.0
31
+ Requires-Dist: sqlmodel>=0.0.22
32
+ Description-Content-Type: text/markdown
33
+
34
+ <figure style="margin-inline: block;">
35
+ <img src="https://bedrock.engineer/public/Bedrock_TextRight.png" alt="Bedrock logo" width="75%"/>
36
+ </figure>
37
+
38
+ <h3 style="margin-inline: block;">Bedrock, the Open Source Foundation for Geotechnical Engineering</h3>
39
+
40
+ ---
41
+
42
+ 🌐 **Website:** <https://bedrock.engineer/>
43
+
44
+ 📃 **Documentation:** <https://bedrock.engineer/docs>
45
+
46
+ 📃 **API Reference:** <https://bedrock.engineer/reference/>
47
+
48
+ 🖥️ **Source Code:** <https://github.com/bedrock-engineer/bedrock-ge>
49
+
50
+ 🐍 **`bedrock-ge` on PyPI:** <https://pypi.org/project/bedrock-ge/>
51
+
52
+ 🔗 **LinkedIn:** <https://www.linkedin.com/company/bedrock-engineer>
53
+
54
+ ---
55
+
56
+ ## Overview
57
+
58
+ > **Definition of Bedrock**
59
+ >
60
+ > In an abstract sense, the bedrock refers to the main principles something is based on. [1]
61
+ >
62
+ > In the real world, the bedrock is the hard area of rock in the ground that holds up the loose soil above. [1]
63
+ >
64
+ > In many civil engineering projects, the identification of the bedrock through digging, drilling or geophysical methods is an important task, which greatly influences (geotechnical) design. [2]
65
+ >
66
+ > Sources: [[1] Bedrock | Cambridge Dictionary](https://dictionary.cambridge.org/us/dictionary/english/bedrock), [[2] Bedrock | Wikipedia](https://en.wikipedia.org/wiki/Bedrock)
67
+
68
+ Ground Investigation (GI) data is often trapped in legacy formats that limit analysis and visualization possibilities.
69
+ `bedrock-ge` lets you transform this data from specialized geotechnical formats and common tabular formats (Excel, CSV) into modern, standardized geospatial data.
70
+
71
+ This standardization lets you bridge the gap between raw geotechnical data, the modern Python (geo)scientific ecosystem and modern geospatial tools.
72
+ This gives geotechnical engineers greater flexibility in visualization, modeling, and integration across different software environments while avoiding vendor lock-in.
73
+ For example, this enables connecting your GI data with GIS as well as BIM environments through [platforms like Speckle](#-put-your-gi-data-into-speckle).
74
+
75
+ The purpose of Bedrock is NOT to become THE standard for geotechnical data, because [we don't need 15 instead of 14 competing standards](https://xkcd.com/927/).
76
+
77
+ ## Highlights
78
+
79
+ ### 📖 Read / write Ground Investigation (GI) data in different formats
80
+
81
+ | Data Format | Read | Write |
82
+ | ----------- | ---- | ----- |
83
+ | AGS 3 | ✅ | ❌ |
84
+ | AGS 4 | ✅ | ✅ |
85
+ | Excel | ✅ | ✅ |
86
+ | CSV | ✅ | ✅ |
87
+ | JSON | ✅ | ✅ |
88
+ | GeoJSON | ✅ | ✅ |
89
+
90
+ Do you need another format? Like [DIGGS](https://diggsml.org/), [NADAG](https://www.ngu.no/geologisk-kartlegging/om-nadag-nasjonal-database-grunnundersokelser), [GEF](https://publicwiki.deltares.nl/display/STREAM/Dutch+National+GEF+Standards), or something else?
91
+ Let us know by creating an [issue](https://github.com/bedrock-engineer/bedrock-ge/issues) or starting a [discussion](https://github.com/orgs/bedrock-engineer/discussions).
92
+
93
+ Also, if you have a project with publicly available GI data, please share that in a [discussion](https://github.com/orgs/bedrock-engineer/discussions), such that we can create a tutorial from it.
94
+
95
+ ### ✅ Validate your GI data
96
+
97
+ `bedrock-ge` comes with data validation to make sure that you can combine Ground Investigation data from multiple files into a single geospatial database with consistent relationships between GI locations, samples, in-situ measurements and lab tests.
98
+
99
+ This data validation mechanism (based on [`pandera`](https://pandera.readthedocs.io/en/stable/)) is easily extensible, giving you the power to add your own data validation criteria.
100
+
101
+ ### 🗺️ Put your GI data from multiple files into a single 3D geospatial database
102
+
103
+ For example, you can take GI data from 100 AGS files and combine them into a single a [GeoPackage](https://en.wikipedia.org/wiki/GeoPackage) ([like a Shapefile, but then waaay better](http://switchfromshapefile.org/)). Such a GeoPackage can then be loaded into ArcGIS, where you can visualize your GI data in 3D:
104
+
105
+ <figure style="margin-inline: block; display: block;">
106
+ <img src="https://bedrock.engineer/public/images/KaiTak_BrGI_ArcGIS.webp" alt="Kai Tak, Hong Kong, 3D GI data visualization in ArcGIS" width="90%"/>
107
+ <figcaption>
108
+ GI data in Kai Tak, Hong Kong. <a href="https://arcg.is/0r9DG9">Click here to explore for yourself.</a>
109
+ </figcaption>
110
+ </figure>
111
+
112
+ ### 🟦 Put your GI data into Speckle
113
+
114
+ From ArcGIS or QGIS you can publish your GI data to [Speckle](https://speckle.systems/) and then visualize it together with your ground models and civil engineering designs:
115
+
116
+ <figure style="margin-inline: block; display: block;">
117
+ <img src="https://bedrock.engineer/public/images/KaiTak_BrGI_Speckle.png" alt="Kai Tak, Hong Kong, data from many sources in Speckle." width="90%"/>
118
+ <figcaption>
119
+ Models from Rhino, Revit, Civil3D + context & GI data from Q/ArcGIS. <a href="https://app.speckle.systems/projects/013aaf06e7/models/0fa0287ba8,1cbe68ed69,44c8d1ecae,7f9d99cae2,9535541c2b,a739490298,ff81bfa02b">Click here to explore for yourself.</a>
120
+ </figcaption>
121
+ </figure>
122
+
123
+ <figure style="margin-inline: block; display: block;">
124
+ <img src="https://bedrock.engineer/public/images/WekaHills_Speckle.webp" alt="GI data, the derived Leapfrog ground model and a tunnel in Speckle." width="90%"/>
125
+ <figcaption>
126
+ GI data, the derived Leapfrog ground model and a tunnel in Speckle. <a href="https://app.speckle.systems/projects/7a489ac0d4/models/$epsg:2193-7839%2Fgeo%2Fgeology-model,65b4cf97d5,9069ef2b2b">Click here to explore for yourself.</a>
127
+ </figcaption>
128
+ </figure>
129
+
130
+ Moreover, your GI data becomes available in all the software that [Speckle has connectors for](https://app.speckle.systems/downloads).
131
+
132
+ ### 🔓 Free and Open Source Software
133
+
134
+ `bedrock-ge` is Free and Open Source Software (FOSS), meaning it gives you full access to the code, and you can customize `bedrock-ge` to integrate with other tools and fit your workflows and project needs.
135
+
136
+ As the name implies, FOSS is free to use, so you're not tied to expensive software licenses or locked into a specific software vendor.
137
+
138
+ You can give [feedback](#-feedback) and [contribute](#-contributing), such that together we can build the tools we've always wanted and needed.
139
+
140
+ ## Installation
141
+
142
+ We recommend to use [`uv`](https://docs.astral.sh/uv/) to manage Python for you.
143
+ Using `uv`, you can add `bedrock-ge` to your Python project and install it in your project's virtual environment by running:
144
+
145
+ ```bash
146
+ uv add bedrock-ge
147
+ ```
148
+
149
+ It's also possible to install `bedrock-ge` from [PyPI](https://pypi.org/project/bedrock-ge/) (Python Packaging Index) using `pip`:
150
+
151
+ ```bash
152
+ pip install bedrock-ge
153
+ ```
154
+
155
+ ## Feedback
156
+
157
+ Got some feedback, a great idea, running into problems when working with Bedrock or just want to ask some questions?
158
+
159
+ Please feel free to:
160
+
161
+ 1. Open an issue for feature requests or bug reports: [`bedrock-ge` issues](https://github.com/bedrock-engineer/bedrock-ge/issues),
162
+ 2. Start a discussion in this GitHub repo: [Bedrock discussions](https://github.com/orgs/bedrock-engineer/discussions),
163
+ 3. Or start a discussion on the Speckle community forum if that's more appropriate: [Speckle community forum](https://speckle.community/)
164
+
165
+ All feedback and engagement with the Bedrock community is welcome.
166
+
167
+ ## Contributing
168
+
169
+ Contributing isn't scary. Contributing isn't just about writing code:
170
+
171
+ - Spread the word about Bedrock
172
+ - Use Bedrock and provide [feedback](#-feedback)
173
+ - Share how you use Bedrock
174
+ - Help each other out, e.g. by replying to questions in the [discussions](https://github.com/orgs/bedrock-engineer/discussions) or [`bedrock-ge` issues](https://github.com/bedrock-engineer/bedrock-ge/issues)
175
+ - Documentation and tutorials
176
+ - Most pages on the [bedrock.engineer](https://bedrock.engineer/) website can be edited, so if you see a spelling mistake or have a suggestion on how to explain something better, click this button to make a contribition.
177
+
178
+ <figure style="margin-inline: block;">
179
+ <img src="https://bedrock.engineer/public/images/EditThisPage.png" alt="Edit this page on GitHub button on bedrock.engineer" width="25%"/>
180
+ </figure>
181
+
182
+ - If you would like to contribute code, awesome!
183
+ Please create an [issue](https://github.com/bedrock-engineer/bedrock-ge/issues) for what you'd like to contribute. If you don't know how to get started, please indicate this in your issue, and we'll help you out.
184
+
185
+ ## Maintainers
186
+
187
+ ### Joost
188
+
189
+ > I studied geotechnical engineering and applied geophysics and then worked for [Arup](https://www.arup.com/) for 4 years as a geotechnical engineer and [computational designer](https://www.arup.com/services/computational-and-parametric-design/).
190
+ >
191
+ > During my time at Arup I worked a lot on bringing computational design into the world of geotechnical engineering, and on [bridging the gaps between geotechnical engineering and structural engineering](https://www.linkedin.com/posts/joost-gevaert_lightbim-lightbim-lightbim-activity-7234726439835549697-3xdO).
192
+ >
193
+ > Bedrock is the Free and Open Source Software (FOSS) that I wish existed when I worked as a geotechnical engineer at Arup.
194
+
195
+ ### Jules
196
+
197
+ > I studied Applied Geoscience (Petroleum Engineering Reservoir Geology) but frustration with technical software led me to learn to code and as a result, I mostly worked in software development.
198
+ >
199
+ > Over the past 5 years, I’ve worked on data-rich applications across various domains, specifically in frontend development.
200
+ > My primary interest is figuring out how to build tools for more thoughtful display and processing of technical information, for geoscience in particular.
201
+
202
+ ## Contributors
203
+
204
+ Please take a look at the [contributors page](https://github.com/bedrock-engineer/bedrock-ge/graphs/contributors).
205
+
206
+ ## Professional Support
207
+
208
+ While `bedrock-ge` is an Free Open Source Software (FOSS) project, you might be looking for professional support implementing it, contact <info@bedrock.engineer> for more information.
@@ -0,0 +1,22 @@
1
+ bedrock_ge/__init__.py,sha256=F4CYyFSMweApwDS139REvy262QKShDMRdP739NOv9Co,89
2
+ bedrock_ge/plot.py,sha256=C95aj8CXjFVZRGYYBssJMm5MyljLbdt_TKyvmQyWZBE,149
3
+ bedrock_ge/gi/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
4
+ bedrock_ge/gi/ags.py,sha256=k2ZotuEt08hGvLAjKCDFR_HLFCRHVuMej1dnw-T6WI4,4388
5
+ bedrock_ge/gi/ags3.py,sha256=HNdX1avwzzZsrkTm54aqs9neUrTXa2e784Q8mSy6Zso,10161
6
+ bedrock_ge/gi/ags3_data_dictionary.json,sha256=Wx20_oJRdAlzEo-cKD6FgN9B9zOMDTcsp5dgc8QWofI,188588
7
+ bedrock_ge/gi/ags4.py,sha256=pDKf-l1jheeQAU2bHkiJiIgjUGvD3Iv8of77rYDwUQA,916
8
+ bedrock_ge/gi/ags4_data_dictionary.json,sha256=XE5XJNo8GBPZTUPgvVr3QgO1UfEIAxzlSeXi-P1VLTs,609670
9
+ bedrock_ge/gi/ags_schemas.py,sha256=R5yubnRacAlQBqb7W7Rj_Y4canhg6Tls38e66xXQNRA,8065
10
+ bedrock_ge/gi/db_operations.py,sha256=Pjtslv9syB-_xumH38F2XWt6XLsvrT8MHLgwAGCYEw0,5153
11
+ bedrock_ge/gi/geospatial.py,sha256=w9sP3SIZZceSW98z3LQT_aJKqs0rSd4DDunTFFSJygY,13739
12
+ bedrock_ge/gi/io_utils.py,sha256=Yd1RGEo_DbYoOklJbEKWdaeTw7KckkHDfKZrr91fu1o,9456
13
+ bedrock_ge/gi/mapper.py,sha256=8vFVPlgLY37iNw_5pkSyze6zOmeQjlBHGY4OAFdx5B0,8665
14
+ bedrock_ge/gi/mapping_models.py,sha256=cvepeKwqwdmVqbNBORkgIDgHq0eOPiRIERjO4RYeAQo,1876
15
+ bedrock_ge/gi/schemas.py,sha256=w0tb3c6YBTXdvpdFWWIGmlE7CYsJfo352nWnD9bmXfM,6883
16
+ bedrock_ge/gi/sqlmodels.py,sha256=_h3H9UP91I_1Ya_SZuL6gZbqL7uNCd5Y-u-yTf7CNto,2253
17
+ bedrock_ge/gi/validate.py,sha256=hgT5qZHLeeXR_cgXf1bhzJnJ-wMhE0_0if_H1rtwsiM,3918
18
+ bedrock_ge/gi/write.py,sha256=N8i1oerOaR7-XJnycmN9gXLkpjMdT5PFFB3GduogyKs,4749
19
+ bedrock_ge-0.3.0.dist-info/METADATA,sha256=dGqh8KV7QCwnhi67RrQOfGtj5USY8Ml6Pr627jDKeMA,11678
20
+ bedrock_ge-0.3.0.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
21
+ bedrock_ge-0.3.0.dist-info/licenses/LICENSE,sha256=xx0jnfkXJvxRnG63LTGOxlggYnIysveWIZ6H3PNdCrQ,11357
22
+ bedrock_ge-0.3.0.dist-info/RECORD,,
File without changes