You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
<abbr>Geotechnical Exchange Format (GEF)</abbr> is a standardized,
48
+
<abbr>[Geotechnical Exchange Format](http://localhost:4321/reference/formats/gef/gef/) (GEF)</abbr> is a standardized,
47
49
text-based format designed to facilitate the reliable exchange and archiving
48
50
of geotechnical investigation data, particularly CPT results, across
49
51
different organizations and software platforms. GEF can also be used for
50
52
other types of soil tests, like <a href="https://bedrock.engineer/reference/formats/gef/gef-cpt/">CPTs</a>. It is widely used in the
51
-
Netherlands in ground investigation.
53
+
Netherlands and Belgium in ground investigation.
52
54
</p>
53
55
</details>
54
56
@@ -113,7 +115,7 @@ def _(Path, pygef):
113
115
114
116
@app.cell(hide_code=True)
115
117
def_(mo):
116
-
mo.md("pygef uses [polars](https://pola.rs/) for DataFrames, for consistency we will convert them to [Pandas](http://pandas.pydata.org/) DataFrames in this notebook.").callout("warn")
118
+
mo.md("pygef uses [polars](https://pola.rs/) for DataFrames, for consistency, we convert them to [Pandas](http://pandas.pydata.org/) DataFrames in this notebook.").callout("warn")
117
119
return
118
120
119
121
@@ -128,6 +130,7 @@ def _(boreholes, mo):
128
130
@app.cell(hide_code=True)
129
131
def_(multiselect):
130
132
index=multiselect.valueor0
133
+
index
131
134
return (index,)
132
135
133
136
@@ -148,11 +151,11 @@ def _(mo):
148
151
mo.md(r"""
149
152
## Converting multiple GEF files to a relational database
150
153
151
-
Rather than dealing with a folder of files in a format that very few software can handle, we would like to combine all of these files into a single database with spatial information. This is where `bedrock-ge` comes in.
154
+
Rather than dealing with a folder of files in a format that not much software can handle, we would like to combine all of these files into a single database with spatial information. This is where `bedrock-ge` comes in.
152
155
153
156
### Relational Databases
154
157
155
-
A [relational database](https://observablehq.com/blog/databases-101-basics-data-analysts#what-are-relational-databases) is a database with multiple tables that are linked to each other with relations. This type of database is ideal for storing GI data, given its [hierarchical structure](https://bedrock.engineer/docs/#hierarchical-nature-of-gi-data).
158
+
A [relational database](https://observablehq.com/blog/databases-101-basics-data-analysts#what-are-relational-databases) is a database with multiple tables that are linked to each other with relations. This type of database is ideal for storing GI data, given its [hierarchical structure](https://bedrock.engineer/explanation/hierarchical-structure/).
156
159
157
160
In Python it's convenient to represent a relational database as a dictionary of DataFrames.
The data is in EPSG:28992, which is the [Rijksdriehoekscoördinaten (NL)](https://nl.wikipedia.org/wiki/Rijksdriehoeksco%C3%B6rdinaten) system, also called "Amersfoort / RD New". This reference system does not include elevation.
178
181
179
182
To represent GI data spatially in 3D geometry we need a CRS **with elevation**. That's why we will use
180
-
EPSG:5709NAP height as the vertical CS.
183
+
[EPSG:5709](https://epsg.org/crs_5709/NAP-height.html) "Normaal Amsterdams Peil (NAP) height" as the vertical reference system.
Here we create a DataFrame for the In-Situ data of all GI locations. To relate the in-situ data to locations and the project, we add foreign keys.
256
+
Here we create a DataFrame for the In-Situ data of all GI locations. To relate the in-situ data to locations and the project, we add foreign keys to each row.
Now let's convert the various tables (`Location`, `LonLatHeight`, `In-SituTests` ) into geospatial DataFrames with interpolated geometry data using `bedrock-ge`'s `create_brgi_geodb`.
293
+
""")
294
+
return
295
+
296
+
286
297
@app.cell
287
298
def_(brgi_db, create_brgi_geodb):
288
299
brgi_geodb=create_brgi_geodb(brgi_db)
@@ -319,20 +330,22 @@ def _(mo):
319
330
320
331
321
332
The reason for creating the `LonLatHeight` table is that vertical lines in projected Coordinate Reference Systems (CRS) are often not rendered nicely by default in all web-mapping software. Vertical lines are often not visible when looking at a map from above, and not all web-mapping software is capable of handling geometry in non-WGS84, i.e. (Lon, Lat) coordinates.
333
+
334
+
`brgi_geodb.LonLatHeight` is a GeoPandas GeoDataFrame, which has an `.explore()` utility method to view the data on a webmap.
## Saving the GI geospatial database as a GeoPackage (.gpkg)
343
356
344
-
Finally, we'll write it to an actual geospatial database file, a [GeoPackage](https://www.geopackage.org/), so we can share our GI data with others, for example, to reuse it in other computational notebooks, create dashboards, access the GI data in QGIS or ArcGIS, and more...
357
+
Finally, we'll write it to an actual geospatial database file, a [GeoPackage](https://www.geopackage.org/), so we can share our GI data with others, for example, to reuse it in other computational notebooks, create dashboard apps, access the GI data in QGIS or ArcGIS, and more...
358
+
359
+
A GeoPackage is an <abbr title="Open Geospatial Consortium">OGC-standardized</abbr> extension of SQLite, a relational database in a single file. SQLite is the most deployed database in the world, it's probably on every device you own.
345
360
346
-
A GeoPackage is an <abbr title="Open Geospatial Consortium">OGC-standardized</abbr> extension of SQLite (a relational database in a single file, .sqlite or .db) that allows you to store any type of GIS data (both raster as well as vector data) in a single file that has the .gpkg extension. Therefore, many (open-source) GIS software packages support GeoPackage!
361
+
GeoPackage allows you to store any type of GIS data (both raster as well as vector data) in a single file that has the `.gpkg` extension. Therefore, many (open-source) GIS software packages support GeoPackage!
347
362
""")
348
363
return
349
364
350
365
351
-
@app.cell
352
-
def_(brgi_db, check_brgi_geodb):
353
-
check_brgi_geodb(brgi_db)
366
+
@app.cell(hide_code=True)
367
+
def_(mo):
368
+
mo.md(r"""
369
+
`check_brgi_geodb` checks that all tables in the BedrockGI geospatial database conform to their respective schemas and that all foreign key relationships are properly maintained.
0 commit comments