bedrock-ge 0.2.3__py3-none-any.whl → 0.2.4__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/__init__.py CHANGED
@@ -1,3 +1,3 @@
1
1
  """Bedrock, the open source foundation for ground engineering."""
2
2
 
3
- __version__ = "0.2.3"
3
+ __version__ = "0.2.4"
bedrock_ge/gi/ags/read.py CHANGED
@@ -18,7 +18,7 @@ def ags_to_dfs(ags_data: str) -> Dict[str, pd.DataFrame]:
18
18
 
19
19
  Returns:
20
20
  Dict[str, pd.DataFrame]]: A dictionary where keys represent AGS group
21
- names with corresponding DataFrames for the corresponding group data.
21
+ names with corresponding DataFrames for the corresponding group data.
22
22
  """
23
23
  # Process each line to find the AGS version and delegate parsing
24
24
  for line in ags_data.splitlines():
@@ -57,8 +57,9 @@ def ags3_to_dfs(ags3_data: str) -> Dict[str, pd.DataFrame]:
57
57
  ags3_data (str): The AGS 3 data as a string.
58
58
 
59
59
  Returns:
60
- Dict[str, pd.DataFrame]: A dictionary of pandas DataFrames, where each key represents a group name from AGS 3 data,
61
- and the corresponding value is a pandas DataFrame containing the data for that group.
60
+ Dict[str, pd.DataFrame]: A dictionary of pandas DataFrames, where each key
61
+ represents a group name from AGS 3 data, and the corresponding value is a
62
+ pandas DataFrame containing the data for that group.
62
63
  """
63
64
  # Initialize dictionary and variables used in the AGS 3 read loop
64
65
  ags3_dfs = {}
@@ -156,8 +157,9 @@ def ags4_to_dfs(ags4_data: str) -> Dict[str, pd.DataFrame]:
156
157
  ags4_data (str): The AGS 4 data as a string.
157
158
 
158
159
  Returns:
159
- Dict[str, pd.DataFrame]: A dictionary of pandas DataFrames, where each key represents a group name from AGS 4 data,
160
- and the corresponding value is a pandas DataFrame containing the data for that group.
160
+ Dict[str, pd.DataFrame]: A dictionary of pandas DataFrames, where each key
161
+ represents a group name from AGS 4 data, and the corresponding value is a
162
+ pandas DataFrame containing the data for that group.
161
163
  """
162
164
  # AGS4.AGS4_to_dataframe accepts the file, not the data string
163
165
  ags4_file = io.StringIO(ags4_data)
@@ -43,7 +43,7 @@ def ags3_db_to_no_gis_brgi_db(
43
43
 
44
44
  Returns:
45
45
  Dict[str, pd.DataFrame]: A dictionary containing Bedrock GI database tables,
46
- where keys are table names and values are transformed pandas DataFrames.
46
+ where keys are table names and values are transformed pandas DataFrames.
47
47
 
48
48
  Note:
49
49
  The function creates a copy of the input database to avoid modifying the original data.
@@ -20,7 +20,7 @@ def concatenate_databases(
20
20
  db2 (Dict[str, pd.DataFrame]): A dictionary of pandas DataFrames, i.e. a database.
21
21
 
22
22
  Returns:
23
- dict: A dictionary of concatenated pandas DataFrames.
23
+ concatenated_dict (Dict[str, pd.DataFrame]): A dictionary of concatenated pandas DataFrames.
24
24
  """
25
25
  # Create a new dict to store the concatenated dataframes
26
26
  concatenated_dict = {key: df.dropna(axis=1, how="all") for key, df in db1.items()}
@@ -28,14 +28,15 @@ def calculate_gis_geometry(
28
28
 
29
29
  Returns:
30
30
  Dict[str, gpd.GeoDataFrame]: Dictionary containing the Bedrock GI database tables
31
- with added GIS geometry. All tables are converted to GeoDataFrames with
32
- appropriate CRS and geometry columns.
31
+ with added GIS geometry. All tables are converted to GeoDataFrames with
32
+ appropriate CRS and geometry columns.
33
33
 
34
34
  Raises:
35
35
  ValueError: If the projects in the database use different Coordinate Reference Systems (CRS).
36
36
 
37
37
  Note:
38
38
  The function performs the following operations:
39
+
39
40
  1. Verifies all projects use the same CRS
40
41
  2. Calculates GIS geometry for the 'Location' table
41
42
  3. Creates a 'LonLatHeight' table for 2D visualization
@@ -155,7 +156,7 @@ def calculate_location_gis_geometry(
155
156
 
156
157
  def calculate_wgs84_coordinates(
157
158
  from_crs: CRS, easting: float, northing: float, elevation: Union[float, None] = None
158
- ) -> Tuple:
159
+ ) -> Tuple[float, float, (float | None)]:
159
160
  """Transforms coordinates from an arbitrary Coordinate Reference System (CRS) to the WGS84 CRS, which is the standard for geodetic coordinates.
160
161
 
161
162
  Args:
@@ -166,9 +167,10 @@ def calculate_wgs84_coordinates(
166
167
  transform. Defaults to None.
167
168
 
168
169
  Returns:
169
- tuple: A tuple containing the longitude, latitude and WGS84 height of the
170
- transformed point, in that order. The height is None if no elevation was
171
- given, or if the provided CRS doesn't have a proper datum defined.
170
+ Tuple[float, float, (float | None)]: A tuple containing the longitude, latitude
171
+ and WGS84 height of the transformed point, in that order.
172
+ The height is None if no elevation was given, or if the provided CRS doesn't
173
+ have a proper datum defined.
172
174
  """
173
175
  transformer = Transformer.from_crs(from_crs, 4326, always_xy=True)
174
176
  if elevation:
@@ -177,7 +179,7 @@ def calculate_wgs84_coordinates(
177
179
  lon, lat = transformer.transform(easting, northing)
178
180
  wgs84_height = None
179
181
 
180
- return lon, lat, wgs84_height
182
+ return (lon, lat, wgs84_height)
181
183
 
182
184
 
183
185
  def create_lon_lat_height_table(
@@ -197,7 +199,7 @@ def create_lon_lat_height_table(
197
199
  crs (CRS): The Coordinate Reference System of the GI locations.
198
200
 
199
201
  Returns:
200
- GeoDataFrame: The 'LonLatHeight' GeoDataFrame.
202
+ gpd.GeoDataFrame: The 'LonLatHeight' GeoDataFrame.
201
203
  """
202
204
  lon_lat_height = gpd.GeoDataFrame(
203
205
  brgi_location[
@@ -231,9 +233,9 @@ def calculate_in_situ_gis_geometry(
231
233
 
232
234
  Returns:
233
235
  gpd.GeoDataFrame: The GIS geometry for the given in-situ data, with additional columns:
234
- - elevation_at_top: The elevation at the top of the in-situ data.
235
- - elevation_at_base: The elevation at the base of the in-situ data.
236
- - geometry: The GIS geometry of the in-situ data.
236
+ - elevation_at_top: The elevation at the top of the in-situ data.
237
+ - elevation_at_base: The elevation at the base of the in-situ data.
238
+ - geometry: The GIS geometry of the in-situ data.
237
239
  """
238
240
  location_child = brgi_in_situ.copy()
239
241
 
bedrock_ge/gi/validate.py CHANGED
@@ -33,7 +33,7 @@ def check_brgi_database(brgi_db: Dict[str, Union[pd.DataFrame, gpd.GeoDataFrame]
33
33
  values are the corresponding data tables (DataFrame or GeoDataFrame).
34
34
 
35
35
  Returns:
36
- bool: True if all tables are valid and relationships are properly maintained.
36
+ is_valid (bool): True if all tables are valid and relationships are properly maintained.
37
37
 
38
38
  Example:
39
39
  ```python
bedrock_ge/gi/write.py CHANGED
@@ -16,7 +16,8 @@ def write_gi_db_to_gpkg(
16
16
  separate table named by the keys of the dictionary.
17
17
 
18
18
  Args:
19
- brgi_db (dict): A dictionary where keys are brgi table names and values are DataFrames
19
+ brgi_db (Dict[str, Union[pd.DataFrame, gpd.GeoDataFrame]]): A dictionary where
20
+ keys are brgi table names and values are pandas DataFrames or GeoDataFrames
20
21
  with brgi data.
21
22
  gpkg_path (str): The name of the output GeoPackage file.
22
23
 
@@ -39,7 +40,7 @@ def write_gi_db_to_gpkg(
39
40
 
40
41
 
41
42
  def write_gi_db_to_excel(
42
- gi_db: Dict[str, Union[pd.DataFrame, gpd.GeoDataFrame]],
43
+ gi_dfs: Dict[str, Union[pd.DataFrame, gpd.GeoDataFrame]],
43
44
  excel_path: Union[str, Path],
44
45
  ) -> None:
45
46
  """Writes a database with Ground Investigation data to an Excel file.
@@ -49,15 +50,17 @@ def write_gi_db_to_excel(
49
50
  AGS, Bedrock, or another format.
50
51
 
51
52
  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.
53
+ gi_dfs (Dict[str, Union[pd.DataFrame, gpd.GeoDataFrame]]): A dictionary where
54
+ keys are GI table names and values are DataFrames with GI data.
55
+ excel_path (Union[str, Path]): Path to the output Excel file. Can be provided as a
56
+ string or Path object.
54
57
 
55
58
  Returns:
56
59
  None
57
60
  """
58
61
  # Create an Excel writer object
59
62
  with pd.ExcelWriter(excel_path, engine="openpyxl") as writer:
60
- for sheet_name, df in gi_db.items():
63
+ for sheet_name, df in gi_dfs.items():
61
64
  sanitized_sheet_name = sanitize_table_name(sheet_name)
62
65
  if isinstance(df, pd.DataFrame) or isinstance(df, gpd.GeoDataFrame):
63
66
  df.to_excel(writer, sheet_name=sanitized_sheet_name, index=False)
@@ -76,7 +79,7 @@ def sanitize_table_name(sheet_name):
76
79
  sheet_name (str): The original sheet name.
77
80
 
78
81
  Returns:
79
- sanitized_name: A sanitized sheet name with invalid characters and spaces replaced.
82
+ sanitized_name (str): A sanitized sheet name with invalid characters and spaces replaced.
80
83
  """
81
84
  # Trim to a maximum length of 31 characters
82
85
  trimmed_name = sheet_name.strip()[:31]
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,209 @@
1
+ Metadata-Version: 2.4
2
+ Name: bedrock-ge
3
+ Version: 0.2.4
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.9
21
+ Classifier: Programming Language :: Python :: 3.10
22
+ Classifier: Programming Language :: Python :: 3.11
23
+ Classifier: Programming Language :: Python :: 3.12
24
+ Classifier: Programming Language :: Python :: 3.13
25
+ Classifier: Topic :: Scientific/Engineering
26
+ Classifier: Topic :: Scientific/Engineering :: GIS
27
+ Requires-Python: >=3.9
28
+ Requires-Dist: geopandas~=1.0
29
+ Requires-Dist: openpyxl~=3.0
30
+ Requires-Dist: pandera>=0.23.0
31
+ Requires-Dist: python-ags4~=1.0
32
+ Requires-Dist: sqlmodel>=0.0.22
33
+ Description-Content-Type: text/markdown
34
+
35
+ <figure style="margin-inline: block;">
36
+ <img src="https://bedrock.engineer/public/Bedrock_TextRight.png" alt="Bedrock logo" width="75%"/>
37
+ </figure>
38
+
39
+ <h3 style="margin-inline: block;">Bedrock, the Open Source Foundation for Geotechnical Engineering</h3>
40
+
41
+ ---
42
+
43
+ 🌐 **Website:** <https://bedrock.engineer/>
44
+
45
+ 📃 **Documentation:** <https://bedrock.engineer/docs>
46
+
47
+ 📃 **API Reference:** <https://bedrock.engineer/reference/>
48
+
49
+ 🖥️ **Source Code:** <https://github.com/bedrock-engineer/bedrock-ge>
50
+
51
+ 🐍 **`bedrock-ge` on PyPI:** <https://pypi.org/project/bedrock-ge/>
52
+
53
+ 🔗 **LinkedIn:** <https://www.linkedin.com/company/bedrock-engineer>
54
+
55
+ ---
56
+
57
+ ## Overview
58
+
59
+ > **Definition of Bedrock**
60
+ >
61
+ > In an abstract sense, the bedrock refers to the main principles something is based on. [1]
62
+ >
63
+ > In the real world, the bedrock is the hard area of rock in the ground that holds up the loose soil above. [1]
64
+ >
65
+ > 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]
66
+ >
67
+ > Sources: [[1] Bedrock | Cambridge Dictionary](https://dictionary.cambridge.org/us/dictionary/english/bedrock), [[2] Bedrock | Wikipedia](https://en.wikipedia.org/wiki/Bedrock)
68
+
69
+ Ground Investigation (GI) data is often trapped in legacy formats that limit analysis and visualization possibilities.
70
+ `bedrock-ge` lets you transform this data from specialized geotechnical formats and common tabular formats (Excel, CSV) into modern, standardized geospatial data.
71
+
72
+ This standardization lets you bridge the gap between raw geotechnical data, the modern Python (geo)scientific ecosystem and modern geospatial tools.
73
+ This gives geotechnical engineers greater flexibility in visualization, modeling, and integration across different software environments while avoiding vendor lock-in.
74
+ 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).
75
+
76
+ 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/).
77
+
78
+ ## Highlights
79
+
80
+ ### 📖 Read / write Ground Investigation (GI) data in different formats
81
+
82
+ | Data Format | Read | Write |
83
+ | ----------- | ---- | ----- |
84
+ | AGS 3 | ✅ | ❌ |
85
+ | AGS 4 | ✅ | ✅ |
86
+ | Excel | ✅ | ✅ |
87
+ | CSV | ✅ | ✅ |
88
+ | JSON | ✅ | ✅ |
89
+ | GeoJSON | ✅ | ✅ |
90
+
91
+ 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?
92
+ 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).
93
+
94
+ 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.
95
+
96
+ ### ✅ Validate your GI data
97
+
98
+ `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.
99
+
100
+ 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.
101
+
102
+ ### 🗺️ Put your GI data from multiple files into a single 3D geospatial database
103
+
104
+ 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:
105
+
106
+ <figure style="margin-inline: block; display: block;">
107
+ <img src="https://bedrock.engineer/public/images/KaiTak_BrGI_ArcGIS.webp" alt="Kai Tak, Hong Kong, 3D GI data visualization in ArcGIS" width="90%"/>
108
+ <figcaption>
109
+ GI data in Kai Tak, Hong Kong. <a href="https://arcg.is/0r9DG9">Click here to explore for yourself.</a>
110
+ </figcaption>
111
+ </figure>
112
+
113
+ ### 🟦 Put your GI data into Speckle
114
+
115
+ 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:
116
+
117
+ <figure style="margin-inline: block; display: block;">
118
+ <img src="https://bedrock.engineer/public/images/KaiTak_BrGI_Speckle.png" alt="Kai Tak, Hong Kong, data from many sources in Speckle." width="90%"/>
119
+ <figcaption>
120
+ 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>
121
+ </figcaption>
122
+ </figure>
123
+
124
+ <figure style="margin-inline: block; display: block;">
125
+ <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%"/>
126
+ <figcaption>
127
+ 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>
128
+ </figcaption>
129
+ </figure>
130
+
131
+ Moreover, your GI data becomes available in all the software that [Speckle has connectors for](https://app.speckle.systems/downloads).
132
+
133
+ ### 🔓 Free and Open Source Software
134
+
135
+ `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.
136
+
137
+ 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.
138
+
139
+ You can give [feedback](#-feedback) and [contribute](#-contributing), such that together we can build the tools we've always wanted and needed.
140
+
141
+ ## Installation
142
+
143
+ We recommend to use [`uv`](https://docs.astral.sh/uv/) to manage Python for you.
144
+ Using `uv`, you can add `bedrock-ge` to your Python project and install it in your project's virtual environment by running:
145
+
146
+ ```bash
147
+ uv add bedrock-ge
148
+ ```
149
+
150
+ It's also possible to install `bedrock-ge` from [PyPI](https://pypi.org/project/bedrock-ge/) (Python Packaging Index) using `pip`:
151
+
152
+ ```bash
153
+ pip install bedrock-ge
154
+ ```
155
+
156
+ ## Feedback
157
+
158
+ Got some feedback, a great idea, running into problems when working with Bedrock or just want to ask some questions?
159
+
160
+ Please feel free to:
161
+
162
+ 1. Open an issue for feature requests or bug reports: [`bedrock-ge` issues](https://github.com/bedrock-engineer/bedrock-ge/issues),
163
+ 2. Start a discussion in this GitHub repo: [Bedrock discussions](https://github.com/orgs/bedrock-engineer/discussions),
164
+ 3. Or start a discussion on the Speckle community forum if that's more appropriate: [Speckle community forum](https://speckle.community/)
165
+
166
+ All feedback and engagement with the Bedrock community is welcome.
167
+
168
+ ## Contributing
169
+
170
+ Contributing isn't scary. Contributing isn't just about writing code:
171
+
172
+ - Spread the word about Bedrock
173
+ - Use Bedrock and provide [feedback](#-feedback)
174
+ - Share how you use Bedrock
175
+ - 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)
176
+ - Documentation and tutorials
177
+ - 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.
178
+
179
+ <figure style="margin-inline: block;">
180
+ <img src="https://bedrock.engineer/public/images/EditThisPage.png" alt="Edit this page on GitHub button on bedrock.engineer" width="25%"/>
181
+ </figure>
182
+
183
+ - If you would like to contribute code, awesome!
184
+ 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.
185
+
186
+ ## Maintainers
187
+
188
+ ### Joost
189
+
190
+ > 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/).
191
+ >
192
+ > 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).
193
+ >
194
+ > Bedrock is the Free and Open Source Software (FOSS) that I wish existed when I worked as a geotechnical engineer at Arup.
195
+
196
+ ### Jules
197
+
198
+ > 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.
199
+ >
200
+ > Over the past 5 years, I’ve worked on data-rich applications across various domains, specifically in frontend development.
201
+ > My primary interest is figuring out how to build tools for more thoughtful display and processing of technical information, for geoscience in particular.
202
+
203
+ ## Contributors
204
+
205
+ Please take a look at the [contributors page](https://github.com/bedrock-engineer/bedrock-ge/graphs/contributors).
206
+
207
+ ## Professional Support
208
+
209
+ 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,21 @@
1
+ bedrock_ge/__init__.py,sha256=9zw1B8qBymbOqc4p2OJ3e8chmXEihHSBt1Fs1BtnvkQ,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/brgi-schema.json,sha256=XaumYqouiflu4Nc8ChyFSHpmpJW4YPG0hsyeSxkuIWQ,850
5
+ bedrock_ge/gi/concatenate.py,sha256=ewPXau86yDTGE92DlbNlQ7gprBHkqBottzHsPbXbEg0,1519
6
+ bedrock_ge/gi/gis_geometry.py,sha256=QXNjWIGANh_M035Lbc94eOZnNry9f778E8wg_7KgAQo,11669
7
+ bedrock_ge/gi/schemas.py,sha256=ZA2wFQOevXtN57XglY-M70TzbZY2RyLHJDRUkmz47_M,2871
8
+ bedrock_ge/gi/sqlmodels.py,sha256=_h3H9UP91I_1Ya_SZuL6gZbqL7uNCd5Y-u-yTf7CNto,2253
9
+ bedrock_ge/gi/validate.py,sha256=riUa9AaHngJDX0VtUrOEKKfr-sZxybrGqJFmq4kRFnA,7080
10
+ bedrock_ge/gi/write.py,sha256=eCfijylreJ5oNMJqqx_k-Y30FNIHys2NccHilrFm0X4,4319
11
+ bedrock_ge/gi/ags/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
12
+ bedrock_ge/gi/ags/ags3_data_dictionary.json,sha256=Wx20_oJRdAlzEo-cKD6FgN9B9zOMDTcsp5dgc8QWofI,188588
13
+ bedrock_ge/gi/ags/ags4_data_dictionary.json,sha256=XE5XJNo8GBPZTUPgvVr3QgO1UfEIAxzlSeXi-P1VLTs,609670
14
+ bedrock_ge/gi/ags/read.py,sha256=FCeMX1R7IGcZY0heqrHPzs13rytelkmmFaJRklPB7EM,7114
15
+ bedrock_ge/gi/ags/schemas.py,sha256=y36n9SCKqFfoIQ_7-MTEdfArA5vAqZdRpY3wC4fdjy4,7451
16
+ bedrock_ge/gi/ags/transform.py,sha256=NeeR6e3awDf3ITWSxAUW1bXspUXaj-dM7xi1g-Ppxhc,9988
17
+ bedrock_ge/gi/ags/validate.py,sha256=ZfBS7AP_CTguLQCbGeyy4Krz32th2yCmtdG9rvX0MOU,703
18
+ bedrock_ge-0.2.4.dist-info/METADATA,sha256=T2dwdFOQ2OLLEN_vNY_HQ_UVfX_iq1ATlbgDLVmXk7E,11727
19
+ bedrock_ge-0.2.4.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
20
+ bedrock_ge-0.2.4.dist-info/licenses/LICENSE,sha256=xx0jnfkXJvxRnG63LTGOxlggYnIysveWIZ6H3PNdCrQ,11357
21
+ bedrock_ge-0.2.4.dist-info/RECORD,,
@@ -1,227 +0,0 @@
1
- Metadata-Version: 2.4
2
- Name: bedrock-ge
3
- Version: 0.2.3
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.9
21
- Classifier: Programming Language :: Python :: 3.10
22
- Classifier: Programming Language :: Python :: 3.11
23
- Classifier: Programming Language :: Python :: 3.12
24
- Classifier: Programming Language :: Python :: 3.13
25
- Classifier: Topic :: Scientific/Engineering
26
- Classifier: Topic :: Scientific/Engineering :: GIS
27
- Requires-Python: >=3.9
28
- Requires-Dist: geopandas~=1.0
29
- Requires-Dist: openpyxl~=3.0
30
- Requires-Dist: pandera>=0.23.0
31
- Requires-Dist: python-ags4~=1.0
32
- Requires-Dist: sqlmodel>=0.0.22
33
- Description-Content-Type: text/markdown
34
-
35
- <p align="center">
36
- <img src="https://bedrock.engineer/public/Bedrock_TextRight.png" alt="Bedrock logo" width="75%"/>
37
- </p>
38
-
39
- <h3 align="center">Bedrock, the Open Source Foundation for Geotechnical Engineering</h3>
40
-
41
- ---
42
-
43
- 📃 **Documentation:** <https://bedrock.engineer/docs>
44
-
45
- 🖥️ **Source Code:** <https://github.com/bedrock-engineer/bedrock-ge>
46
-
47
- 🐍 **`bedrock-ge` on PyPI:** <https://pypi.org/project/bedrock-ge/>
48
-
49
- 🌐 **Website:** <https://bedrock.engineer/>
50
-
51
- 🔗 **LinkedIn:** <https://www.linkedin.com/company/bedrock-engineer>
52
-
53
- ---
54
-
55
- ## 🌟 Highlights
56
-
57
- ### 📖 Read / write Ground Investigation (GI) data in different formats
58
-
59
- | Data Format | Read | Write |
60
- |-------------|------|-------|
61
- | AGS 3 | ✅ | ❌ |
62
- | AGS 4 | Soon | [python-ags4](https://pypi.org/project/python-AGS4/) |
63
- | Excel | ✅ | ✅ |
64
- | CSV | ✅ | ✅ |
65
- | JSON | ✅ | ✅ |
66
- | GeoJSON | ✅ | ✅ |
67
-
68
- What do you need? [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)? Something else?
69
- 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) 💭
70
-
71
- 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 🤩
72
-
73
- ### ✅ Validate your GI data
74
-
75
- `bedrock-ge` comes with data validation to make sure that you can combine Ground Investigation data from multiple files into a single GIS database with consistent relationships between GI locations, samples, in-situ measurements and lab tests.
76
-
77
- 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 💪
78
-
79
- ### 🗺️ Put your GI data from multiple files into a single 3D GIS database
80
-
81
- 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, such that you can visualize your GI data in 3D:
82
-
83
- <p align="center">
84
- <img src="https://bedrock.engineer/public/images/KaiTak_BrGI_ArcGIS.gif" alt="GI data visualization .gif in 3D in ArcGIS" width="90%"/>
85
- </p>
86
-
87
- ### 🟦 Put your GI data into Speckle
88
-
89
- Once you have your GI data inside [Speckle](https://speckle.systems/), it's super easy to visualize GI data together with civil engineering designs:
90
-
91
- <p align="center">
92
- <img src="https://bedrock.engineer/public/images/KaiTak_BrGI_Speckle.png" alt="Kai Tak, Hong Kong, data from many sources." width="56%" />
93
- <img src="https://bedrock.engineer/public/images/BPFoundation.png" alt="Bored Pile foundation design." width="40%" />
94
- <a href="https://app.speckle.systems/projects/013aaf06e7/models/0fa0287ba8@dfbec71408,1cbe68ed69@d3c4a34cff,44c8d1ecae@b962e2f29d,7f9d99cae2@bbed7cf165,9535541c2b@fafe06f9c0,a739490298@e858cc8cb3,ff81bfa02b@dda7c2f981" target="_blank">Click here to go to the Kai Tak Speckle project from the left image</a>
95
- </p>
96
-
97
- Moreover, your GI data becomes available in all the software that [Speckle has connectors for](https://app.speckle.systems/downloads).
98
-
99
- ### 🔓 Free and Open Source Software
100
-
101
- Free and Open Source Software (FOSS) gives you full access to the code, which means you can customize `bedrock-ge` to integrate with other tools and fit your workflows & project needs.
102
-
103
- 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 ⛓️‍💥
104
-
105
- You can give [feedback](#-feedback) and [contribute](#-contributing), such that together we together can build the tools we've always wanted and needed 🤝
106
-
107
- ## ℹ️ Overview
108
-
109
- > **Definition of Bedrock**
110
- >
111
- > In an abstract sense, the main principles on which something is based. [1]
112
- >
113
- > In the real world, the bedrock is the hard area of rock in the ground that holds up the loose soil above. [1]
114
- >
115
- > In many civil engineering projects, the identification of the bedrock through digging, drilling or geophysical methods is an important task, which greatly influences (foundation) design. [2]
116
- >
117
- > Sources: [[1] Bedrock | Cambridge Dictionary](https://dictionary.cambridge.org/us/dictionary/english/bedrock), [[2] Bedrock | Wikipedia](https://en.wikipedia.org/wiki/Bedrock)
118
-
119
- Bedrock, this open source software project, forms the foundation for for ground investigation data, subsurface modelling and Geo-BIM.
120
-
121
- With Bedrock you can get your data from any Ground Investigation data format into a GIS database 🗺️, from a GIS database into Speckle 🟦, and from Speckle into all the software we work with in the AEC industry 🏗️.
122
-
123
- The purpose of Bedrock is NOT to become THE standard for geotechnical data, because we don't need 15 instead of 14 competing standards:
124
-
125
- <p align="center">
126
- <img src="https://bedrock.engineer/public/images/14Become15Standards.png" alt="14 competing standards become 15 competing standards | xkcd.com/927" width="60%"/>
127
- <br>
128
- Source: <a href="https://xkcd.com/927/" target="_blank">https://xkcd.com/927</a>
129
- </p>
130
-
131
- For example, us geotechnical engineers who are used to working with AGS data know that the "ISPT group" is a table that describes an In-Situ Standard Penetration Test and we know what headings, i.e. columns that AGS group, i.e. table has. Therefore, Bedrock doesn't change that the naming of those columns. Bedrock just makes sure that the data is structured in a sensible way, such that Ground Investigation data from multiple sources can be converted into a GIS database.
132
-
133
- A GIS database with Ground Investigation data contains tables that describe the Ground Investigation `'Project'`, the `'Location'`s where GI data was collected, the `'Sample'`s and `'InSitu'` measurements taken at these `'Location'`s, and the `'Lab'` tests that were performed on the collected `'Sample'`s.
134
-
135
- The `'Project'`, `'Location'`, `'Sample'`, `'InSitu'` measurement and `'Lab'` test tables are related to each other: each lab test belongs to a sample, which belongs to a GI location, which belongs to a project. These relationships can be visualized in a hierarchy like this:
136
-
137
- ```bash
138
- 'Project'
139
- └───'Location'
140
- ├───'InSitu'
141
- └───'Sample'
142
- └───'Lab'
143
- ```
144
-
145
- These relationships are represented in the database tables with so-called "foreign keys". For example, the results of an Atterberg Limits Lab test, i.e. Liquid Limit and Plastic Limit tests, that originated from an AGS file would be in stored in the `'Lab_LLPL'` table. Each row in this table represents the Atterberg Limit test results performed on a specific sample. Each row knows to which project, GI location and sample it belongs through its `project_uid`, `location_uid` and `sample_uid` respectively.
146
-
147
- This relational database ([linked tables](https://en.wikipedia.org/wiki/Relational_database)) with Ground Investigation data becomes a GIS database by assigning a (3D) GIS geometry to each of the rows in each of the database tables (except for the `'Project'` table).
148
-
149
- ## ⬇️ Installation
150
-
151
- In case you're using `uv`, you can add `bedrock-ge` to your Python project and install it in your project's virtual environment by running:
152
-
153
- ```bash
154
- uv add bedrock-ge
155
- ```
156
-
157
- I would highly recommend anyone to start using [`uv`](https://docs.astral.sh/uv/) (Unified Virtual Environment Manager) if you're not already doing so. Some of the advantages (Source: [`uv`](https://docs.astral.sh/uv/)):
158
-
159
- - 🖥️ `uv` Python projects will work on Windows, macOS and Linux.
160
- - 🐍 `uv` [installs and manages](https://docs.astral.sh/uv/#python-management) Python versions.
161
- - 🗂️ `uv` provides [comprehensive project management](https://docs.astral.sh/uv/#project-management), with a [universal lockfile](https://docs.astral.sh/uv/concepts/projects/#project-lockfile). This means no more headaches about virtual environments (or having to explain what on earth a virtual env is), or people running different versions of Python or Python packages on the same project, causing errors and other problems.
162
- - In short, 🚀 `uv` is a single tool to replace `pip`, `pip-tools`, `pipx`, `poetry`, `pyenv`, `virtualenv`, `conda` and more...
163
-
164
- It's of course also possible to install `bedrock-ge` from [PyPI](https://pypi.org/project/bedrock-ge/) (Python Packaging Index) using `pip`:
165
-
166
- ```bash
167
- pip install bedrock-ge
168
- ```
169
-
170
- ## 💭 Feedback
171
-
172
- Got some feedback, a great idea, running into problems when working with Bedrock or just want to ask some questions?
173
-
174
- Please feel free to:
175
-
176
- 1. open an issue for feature requests or bug reports: [`bedrock-ge` issues](https://github.com/bedrock-engineer/bedrock-ge/issues),
177
- 2. start a discussion in this GitHub repo: [Bedrock discussions](https://github.com/orgs/bedrock-engineer/discussions),
178
- 3. or start a discussion on the Speckle community forum if that's more appropriate: [Speckle community forum](https://speckle.community/)
179
-
180
- All feedback and engagement with the Bedrock community is welcome 🤗
181
-
182
- ## 👷 Contributing
183
-
184
- 🛑 Wait, please read this too!
185
-
186
- Contributing isn't scary 😄
187
-
188
- Contributing isn't just about writing code:
189
-
190
- - Use Bedrock and provide [feedback](#-feedback) 🪲
191
- - Share how you use Bedrock 🏗️
192
- - 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) 🤝
193
- - Spread the word about Bedrock 🤩
194
- - Documentation and tutorials 📃
195
- - 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, please smash that button! 🖱️💥
196
-
197
- <p align="center">
198
- <img src="https://bedrock.engineer/public/images/EditThisPage.png" alt="Edit this page on GitHub button on bedrock.engineer" width="20%"/>
199
- </p>
200
-
201
- - If you would like to contribute code, AWESOME! 💖
202
- Please create an issue 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.
203
-
204
- ## 🤔 Things to Consider
205
-
206
- ### GIS Data, Projected vs Geodetic CRS's and Heights / Elevations
207
-
208
- Ground investigation data is initially measured in Easting, Northing, z-coordinate, i.e. in a projected Coordinate Reference System (CRS).
209
-
210
- If you want your ground investigation data to go into a GIS database, all GIS geometry needs to use the same CRS.
211
-
212
- Therefore, if you are dealing with GI data collected using different projected CRS's, you'll have to convert the Easting, Northing, z-coordinates to global longitude, latitude, ellipsoidal height coordinates in a geodetic CRS. ([Further reading](https://clover-animantarx-a3a.notion.site/Geomatics-36dfece2dece4358b44c44d08c9cded6))
213
-
214
- Please start a [discussion](https://github.com/orgs/bedrock-engineer/discussions) or create an issue if want to be able to put data that were collected in different projected CRS's into a single GIS database. This is pretty easy with [`geopandas`](https://geopandas.org/en/stable/) / [`pyproj`](https://pyproj4.github.io/pyproj/stable/) transformations, but hasn't been necessary yet.
215
-
216
- ## ✍️ Author
217
-
218
- Hi, I'm Joost Gevaert 👋
219
-
220
- 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.
221
-
222
- 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).
223
-
224
- Bedrock is the Free and Open Source Software (FOSS) that I wish existed when I worked as a geotechnical engineer at Arup.
225
-
226
- > Computational design is a field that involves the use of computer algorithms, simulations, and data analysis to support and enhance the design process. It enables designers to explore vast design spaces, to find solutions to complex design problems, and to make informed decisions based on data-driven insights.
227
- > Source: [Computational design | Arup](https://www.arup.com/services/computational-and-parametric-design/)
@@ -1,21 +0,0 @@
1
- bedrock_ge/__init__.py,sha256=r2ubK-fPZKVKQX5ggtX8Vx3YWk9c-bDNE1FmKYxUNCE,89
2
- bedrock_ge/plot.py,sha256=hUxpZXWlUmf2Ec5CKkGkOBJ_TfC1KM8yUeuMtsqk7A0,70
3
- bedrock_ge/gi/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
4
- bedrock_ge/gi/brgi-schema.json,sha256=XaumYqouiflu4Nc8ChyFSHpmpJW4YPG0hsyeSxkuIWQ,850
5
- bedrock_ge/gi/concatenate.py,sha256=2He9us_q5MF3DbXPIK50-VHtWqkiBNyM63e0vwId2Hc,1480
6
- bedrock_ge/gi/gis_geometry.py,sha256=NxJnuu9xfhlYO5pblynbZQnVYFIQoBx5xnBepQoZG3c,11570
7
- bedrock_ge/gi/schemas.py,sha256=ZA2wFQOevXtN57XglY-M70TzbZY2RyLHJDRUkmz47_M,2871
8
- bedrock_ge/gi/sqlmodels.py,sha256=_h3H9UP91I_1Ya_SZuL6gZbqL7uNCd5Y-u-yTf7CNto,2253
9
- bedrock_ge/gi/validate.py,sha256=0qGTtwytJQbYnRoXa2dj7clsyVPhB9AYPDHVIrK83qc,7069
10
- bedrock_ge/gi/write.py,sha256=3-81-CydjO0BkLNzckGKz1f4G5v9uNWFKRvjZ183PFc,4110
11
- bedrock_ge/gi/ags/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
12
- bedrock_ge/gi/ags/ags3_data_dictionary.json,sha256=Wx20_oJRdAlzEo-cKD6FgN9B9zOMDTcsp5dgc8QWofI,188588
13
- bedrock_ge/gi/ags/ags4_data_dictionary.json,sha256=XE5XJNo8GBPZTUPgvVr3QgO1UfEIAxzlSeXi-P1VLTs,609670
14
- bedrock_ge/gi/ags/read.py,sha256=zb4XHzPKEr7GQ4EeKVRPmy3-v7LVr-Cihog5HtruszE,7077
15
- bedrock_ge/gi/ags/schemas.py,sha256=y36n9SCKqFfoIQ_7-MTEdfArA5vAqZdRpY3wC4fdjy4,7451
16
- bedrock_ge/gi/ags/transform.py,sha256=BB0H_pMKiXF6Px4K6RlMwlQ0c3GXcuSBZFHjyt5QrhM,9984
17
- bedrock_ge/gi/ags/validate.py,sha256=ZfBS7AP_CTguLQCbGeyy4Krz32th2yCmtdG9rvX0MOU,703
18
- bedrock_ge-0.2.3.dist-info/METADATA,sha256=XMO0khsCbGlI1WDso2ITHsJSBgIHtHBZsHrBg-zPMvk,14376
19
- bedrock_ge-0.2.3.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
20
- bedrock_ge-0.2.3.dist-info/licenses/LICENSE,sha256=xx0jnfkXJvxRnG63LTGOxlggYnIysveWIZ6H3PNdCrQ,11357
21
- bedrock_ge-0.2.3.dist-info/RECORD,,