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/__init__.py +1 -1
- bedrock_ge/gi/ags.py +103 -0
- bedrock_ge/gi/ags3.py +275 -0
- bedrock_ge/gi/ags4.py +29 -0
- bedrock_ge/gi/{ags/schemas.py → ags_schemas.py} +29 -8
- bedrock_ge/gi/db_operations.py +128 -0
- bedrock_ge/gi/geospatial.py +349 -0
- bedrock_ge/gi/io_utils.py +271 -0
- bedrock_ge/gi/mapper.py +221 -0
- bedrock_ge/gi/mapping_models.py +69 -0
- bedrock_ge/gi/schemas.py +136 -36
- bedrock_ge/gi/validate.py +46 -109
- bedrock_ge/gi/write.py +58 -38
- bedrock_ge/plot.py +3 -1
- bedrock_ge-0.3.0.dist-info/METADATA +208 -0
- bedrock_ge-0.3.0.dist-info/RECORD +22 -0
- bedrock_ge/gi/ags/__init__.py +0 -0
- bedrock_ge/gi/ags/read.py +0 -190
- bedrock_ge/gi/ags/transform.py +0 -264
- bedrock_ge/gi/ags/validate.py +0 -25
- bedrock_ge/gi/brgi-schema.json +0 -36
- bedrock_ge/gi/concatenate.py +0 -38
- bedrock_ge/gi/gis_geometry.py +0 -280
- bedrock_ge-0.2.3.dist-info/METADATA +0 -227
- bedrock_ge-0.2.3.dist-info/RECORD +0 -21
- /bedrock_ge/gi/{ags/ags3_data_dictionary.json → ags3_data_dictionary.json} +0 -0
- /bedrock_ge/gi/{ags/ags4_data_dictionary.json → ags4_data_dictionary.json} +0 -0
- {bedrock_ge-0.2.3.dist-info → bedrock_ge-0.3.0.dist-info}/WHEEL +0 -0
- {bedrock_ge-0.2.3.dist-info → bedrock_ge-0.3.0.dist-info}/licenses/LICENSE +0 -0
bedrock_ge/gi/gis_geometry.py
DELETED
@@ -1,280 +0,0 @@
|
|
1
|
-
from typing import Dict, Tuple, Union
|
2
|
-
|
3
|
-
import geopandas as gpd
|
4
|
-
import numpy as np
|
5
|
-
import pandas as pd
|
6
|
-
from pyproj import Transformer
|
7
|
-
from pyproj.crs import CRS
|
8
|
-
from shapely.geometry import LineString, Point
|
9
|
-
|
10
|
-
# TODO: change function type hints, such that pandera checks the dataframes against the Bedrock schemas
|
11
|
-
|
12
|
-
|
13
|
-
def calculate_gis_geometry(
|
14
|
-
no_gis_brgi_db: Dict[str, Union[pd.DataFrame, gpd.GeoDataFrame]],
|
15
|
-
verbose: bool = True,
|
16
|
-
) -> Dict[str, gpd.GeoDataFrame]:
|
17
|
-
"""Calculates GIS geometry for tables in a Bedrock Ground Investigation database.
|
18
|
-
|
19
|
-
This function processes a dictionary of DataFrames containing Ground Investigation (GI) data,
|
20
|
-
adding appropriate GIS geometry to each table. It handles both 2D and 3D geometries,
|
21
|
-
including vertical boreholes and sampling locations.
|
22
|
-
|
23
|
-
Args:
|
24
|
-
no_gis_brgi_db (Dict[str, Union[pd.DataFrame, gpd.GeoDataFrame]]): Dictionary containing
|
25
|
-
the Bedrock GI database tables without GIS geometry. Keys are table names,
|
26
|
-
values are either pandas DataFrames or GeoDataFrames.
|
27
|
-
verbose (bool, optional): Whether to print progress information. Defaults to True.
|
28
|
-
|
29
|
-
Returns:
|
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.
|
33
|
-
|
34
|
-
Raises:
|
35
|
-
ValueError: If the projects in the database use different Coordinate Reference Systems (CRS).
|
36
|
-
|
37
|
-
Note:
|
38
|
-
The function performs the following operations:
|
39
|
-
1. Verifies all projects use the same CRS
|
40
|
-
2. Calculates GIS geometry for the 'Location' table
|
41
|
-
3. Creates a 'LonLatHeight' table for 2D visualization
|
42
|
-
4. Processes 'Sample' table if present
|
43
|
-
5. Processes all tables starting with "InSitu_"
|
44
|
-
"""
|
45
|
-
# Make sure that the Bedrock database is not changed outside this function.
|
46
|
-
brgi_db = no_gis_brgi_db.copy()
|
47
|
-
|
48
|
-
if verbose:
|
49
|
-
print("Calculating GIS geometry for the Bedrock GI database tables...")
|
50
|
-
|
51
|
-
# Check if all projects have the same CRS
|
52
|
-
if not brgi_db["Project"]["crs_wkt"].nunique() == 1:
|
53
|
-
raise ValueError(
|
54
|
-
"All projects must have the same CRS (Coordinate Reference System).\n"
|
55
|
-
"Raise an issue on GitHub in case you need to be able to combine GI data that was acquired in multiple different CRS's."
|
56
|
-
)
|
57
|
-
|
58
|
-
crs = CRS.from_wkt(brgi_db["Project"]["crs_wkt"].iloc[0])
|
59
|
-
|
60
|
-
# Calculate GIS geometry for the 'Location' table
|
61
|
-
if verbose:
|
62
|
-
print("Calculating GIS geometry for the Bedrock GI 'Location' table...")
|
63
|
-
brgi_db["Location"] = calculate_location_gis_geometry(brgi_db["Location"], crs)
|
64
|
-
|
65
|
-
# Create the 'LonLatHeight' table.
|
66
|
-
# The 'LonLatHeight' table makes it easier to visualize the GIS geometry on 2D maps,
|
67
|
-
# because vertical lines are often very small or completely hidden in 2D.
|
68
|
-
# This table only contains the 3D of the GI locations at ground level,
|
69
|
-
# in WGS84 (Longitude, Latitude, Height) coordinates.
|
70
|
-
if verbose:
|
71
|
-
print(
|
72
|
-
"Creating 'LonLatHeight' table with GI locations in WGS84 geodetic coordinates...",
|
73
|
-
" WGS84 geodetic coordinates: (Longitude, Latitude, Ground Level Ellipsoidal Height)",
|
74
|
-
sep="\n",
|
75
|
-
)
|
76
|
-
brgi_db["LonLatHeight"] = create_lon_lat_height_table(brgi_db["Location"], crs)
|
77
|
-
|
78
|
-
# Create GIS geometry for tables that have In-Situ GIS geometry.
|
79
|
-
# These are the 'Sample' table and 'InSitu_...' tables.
|
80
|
-
# These tables are children of the Location table,
|
81
|
-
# i.e. have the 'Location' table as the parent table.
|
82
|
-
if "Sample" in brgi_db.keys():
|
83
|
-
if verbose:
|
84
|
-
print("Calculating GIS geometry for the Bedrock GI 'Sample' table...")
|
85
|
-
brgi_db["Sample"] = calculate_in_situ_gis_geometry(
|
86
|
-
brgi_db["Sample"], brgi_db["Location"], crs
|
87
|
-
)
|
88
|
-
|
89
|
-
for table_name, table in brgi_db.items():
|
90
|
-
if table_name.startswith("InSitu_"):
|
91
|
-
if verbose:
|
92
|
-
print(
|
93
|
-
f"Calculating GIS geometry for the Bedrock GI '{table_name}' table..."
|
94
|
-
)
|
95
|
-
brgi_db[table_name] = calculate_in_situ_gis_geometry(
|
96
|
-
table, brgi_db["Location"], crs
|
97
|
-
)
|
98
|
-
|
99
|
-
return brgi_db
|
100
|
-
|
101
|
-
|
102
|
-
def calculate_location_gis_geometry(
|
103
|
-
brgi_location: Union[pd.DataFrame, gpd.GeoDataFrame], crs: CRS
|
104
|
-
) -> gpd.GeoDataFrame:
|
105
|
-
"""Calculates GIS geometry for a set of Ground Investigation locations.
|
106
|
-
|
107
|
-
Args:
|
108
|
-
brgi_location (Union[pd.DataFrame, gpd.GeoDataFrame]): The GI locations to calculate GIS geometry for.
|
109
|
-
crs (pyproj.CRS): The Coordinate Reference System (CRS) to use for the GIS geometry.
|
110
|
-
|
111
|
-
Returns:
|
112
|
-
gpd.GeoDataFrame: The GIS geometry for the given GI locations, with additional columns:
|
113
|
-
- longitude: The longitude of the location in the WGS84 CRS.
|
114
|
-
- latitude: The latitude of the location in the WGS84 CRS.
|
115
|
-
- wgs84_ground_level_height: The height of the ground level of the location in the WGS84 CRS.
|
116
|
-
- elevation_at_base: The elevation at the base of the location.
|
117
|
-
- geometry: The GIS geometry of the location.
|
118
|
-
"""
|
119
|
-
# Calculate Elevation at base of GI location
|
120
|
-
brgi_location["elevation_at_base"] = (
|
121
|
-
brgi_location["ground_level_elevation"] - brgi_location["depth_to_base"]
|
122
|
-
)
|
123
|
-
|
124
|
-
# Make a gpd.GeoDataFrame from the pd.DataFrame by creating GIS geometry
|
125
|
-
brgi_location = gpd.GeoDataFrame(
|
126
|
-
brgi_location,
|
127
|
-
geometry=brgi_location.apply(
|
128
|
-
lambda row: LineString(
|
129
|
-
[
|
130
|
-
(row["easting"], row["northing"], row["ground_level_elevation"]),
|
131
|
-
(row["easting"], row["northing"], row["elevation_at_base"]),
|
132
|
-
]
|
133
|
-
),
|
134
|
-
axis=1,
|
135
|
-
),
|
136
|
-
crs=crs,
|
137
|
-
)
|
138
|
-
|
139
|
-
# Calculate WGS84 geodetic coordinates
|
140
|
-
brgi_location[["longitude", "latitude", "wgs84_ground_level_height"]] = (
|
141
|
-
brgi_location.apply(
|
142
|
-
lambda row: calculate_wgs84_coordinates(
|
143
|
-
from_crs=crs,
|
144
|
-
easting=row["easting"],
|
145
|
-
northing=row["northing"],
|
146
|
-
elevation=row["ground_level_elevation"],
|
147
|
-
),
|
148
|
-
axis=1,
|
149
|
-
result_type="expand",
|
150
|
-
)
|
151
|
-
)
|
152
|
-
|
153
|
-
return brgi_location
|
154
|
-
|
155
|
-
|
156
|
-
def calculate_wgs84_coordinates(
|
157
|
-
from_crs: CRS, easting: float, northing: float, elevation: Union[float, None] = None
|
158
|
-
) -> Tuple:
|
159
|
-
"""Transforms coordinates from an arbitrary Coordinate Reference System (CRS) to the WGS84 CRS, which is the standard for geodetic coordinates.
|
160
|
-
|
161
|
-
Args:
|
162
|
-
from_crs (pyproj.CRS): The pyproj.CRS object of the CRS to transform from.
|
163
|
-
easting (float): The easting coordinate of the point to transform.
|
164
|
-
northing (float): The northing coordinate of the point to transform.
|
165
|
-
elevation (float or None, optional): The elevation of the point to
|
166
|
-
transform. Defaults to None.
|
167
|
-
|
168
|
-
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.
|
172
|
-
"""
|
173
|
-
transformer = Transformer.from_crs(from_crs, 4326, always_xy=True)
|
174
|
-
if elevation:
|
175
|
-
lon, lat, wgs84_height = transformer.transform(easting, northing, elevation)
|
176
|
-
else:
|
177
|
-
lon, lat = transformer.transform(easting, northing)
|
178
|
-
wgs84_height = None
|
179
|
-
|
180
|
-
return lon, lat, wgs84_height
|
181
|
-
|
182
|
-
|
183
|
-
def create_lon_lat_height_table(
|
184
|
-
brgi_location: gpd.GeoDataFrame, crs: CRS
|
185
|
-
) -> gpd.GeoDataFrame:
|
186
|
-
"""Creates a GeoDataFrame with GI locations in WGS84 (lon, lat, height) coordinates.
|
187
|
-
|
188
|
-
The 'LonLatHeight' table makes it easier to visualize the GIS geometry on 2D maps,
|
189
|
-
because vertical lines are often very small or completely hidden in 2D. This table
|
190
|
-
only contains the 3D point of the GI locations at ground level, in WGS84 (Longitude,
|
191
|
-
Latitude, Height) coordinates. Other attributes, such as the location type, sample
|
192
|
-
type, geology description, etc., can be attached to this table by joining, i.e.
|
193
|
-
merging those tables on the location_uid key.
|
194
|
-
|
195
|
-
Args:
|
196
|
-
brgi_location (GeoDataFrame): The GeoDataFrame with the GI locations.
|
197
|
-
crs (CRS): The Coordinate Reference System of the GI locations.
|
198
|
-
|
199
|
-
Returns:
|
200
|
-
GeoDataFrame: The 'LonLatHeight' GeoDataFrame.
|
201
|
-
"""
|
202
|
-
lon_lat_height = gpd.GeoDataFrame(
|
203
|
-
brgi_location[
|
204
|
-
[
|
205
|
-
"project_uid",
|
206
|
-
"location_uid",
|
207
|
-
]
|
208
|
-
],
|
209
|
-
geometry=brgi_location.apply(
|
210
|
-
lambda row: Point(
|
211
|
-
row["longitude"], row["latitude"], row["wgs84_ground_level_height"]
|
212
|
-
),
|
213
|
-
axis=1,
|
214
|
-
),
|
215
|
-
crs=4326,
|
216
|
-
)
|
217
|
-
return lon_lat_height
|
218
|
-
|
219
|
-
|
220
|
-
def calculate_in_situ_gis_geometry(
|
221
|
-
brgi_in_situ: Union[pd.DataFrame, gpd.GeoDataFrame],
|
222
|
-
brgi_location: Union[pd.DataFrame, gpd.GeoDataFrame],
|
223
|
-
crs: CRS,
|
224
|
-
) -> gpd.GeoDataFrame:
|
225
|
-
"""Calculates GIS geometry for a set of Ground Investigation in-situ data.
|
226
|
-
|
227
|
-
Args:
|
228
|
-
brgi_in_situ (Union[pd.DataFrame, gpd.GeoDataFrame]): The in-situ data to calculate GIS geometry for.
|
229
|
-
brgi_location (Union[pd.DataFrame, gpd.GeoDataFrame]): The location data to merge with the in-situ data.
|
230
|
-
crs (CRS): The Coordinate Reference System of the in-situ data.
|
231
|
-
|
232
|
-
Returns:
|
233
|
-
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.
|
237
|
-
"""
|
238
|
-
location_child = brgi_in_situ.copy()
|
239
|
-
|
240
|
-
# Merge the location data into the in-situ data to get the location coordinates
|
241
|
-
location_child = pd.merge(
|
242
|
-
location_child,
|
243
|
-
brgi_location[
|
244
|
-
["location_uid", "easting", "northing", "ground_level_elevation"]
|
245
|
-
],
|
246
|
-
on="location_uid",
|
247
|
-
how="left",
|
248
|
-
)
|
249
|
-
|
250
|
-
# Calculate the elevation at the top of the Sample or in-situ test
|
251
|
-
location_child["elevation_at_top"] = (
|
252
|
-
location_child["ground_level_elevation"] - location_child["depth_to_top"]
|
253
|
-
)
|
254
|
-
brgi_in_situ["elevation_at_top"] = location_child["elevation_at_top"]
|
255
|
-
|
256
|
-
# Calculate the elevation at the base of the Sample or in-situ test
|
257
|
-
if "depth_to_base" in location_child.columns:
|
258
|
-
location_child["elevation_at_base"] = (
|
259
|
-
location_child["ground_level_elevation"] - location_child["depth_to_base"]
|
260
|
-
)
|
261
|
-
brgi_in_situ["elevation_at_base"] = location_child["elevation_at_base"]
|
262
|
-
|
263
|
-
# Create the in-situ data as a GeoDataFrame with LineString GIS geometry for
|
264
|
-
# Samples or in-situ tests that have an elevation at the base of the Sample or in-situ test.
|
265
|
-
brgi_in_situ = gpd.GeoDataFrame(
|
266
|
-
brgi_in_situ,
|
267
|
-
geometry=location_child.apply(
|
268
|
-
lambda row: LineString(
|
269
|
-
[
|
270
|
-
(row["easting"], row["northing"], row["elevation_at_top"]),
|
271
|
-
(row["easting"], row["northing"], row["elevation_at_base"]),
|
272
|
-
]
|
273
|
-
)
|
274
|
-
if "elevation_at_base" in row and not np.isnan(row["elevation_at_base"])
|
275
|
-
else Point((row["easting"], row["northing"], row["elevation_at_top"])),
|
276
|
-
axis=1,
|
277
|
-
),
|
278
|
-
crs=crs,
|
279
|
-
)
|
280
|
-
return brgi_in_situ
|
@@ -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,,
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|