3D geological modelling workflow from spatial data preparation through
implicit surface modelling and 3D visualization. Use when building
geological models from surface data, boreholes, or GIS inputs.
Standardmäßig ist der Prompt ausgewählt, der zuerst die Quelle prüft. Sie können zu einem direkten Befehl wechseln oder eine lokale Kopie herunterladen.
Quelldateien prüfen
Lesen Sie SKILL.md und alle von SkillsMP angezeigten Begleitdateien, bevor Sie sich für eine Installation entscheiden.
Mit Codex oder Claude installieren Kopieren Sie diesen Prompt, fügen Sie ihn in Codex, Claude oder einen anderen Assistant ein und lassen Sie die Skill-Seite prüfen und installieren.
Ein direkter Befehl überspringt den Prüf-Prompt. Prüfen Sie die Quelle, bevor Sie ihn ausführen.
3D geological modelling workflow from spatial data preparation through
implicit surface modelling and 3D visualization. Use when building
geological models from surface data, boreholes, or GIS inputs.
End-to-end pipeline for building 3D geological models from spatial data,
covering GIS data preparation, implicit surface modelling, and 3D visualization.
Rule of thumb: Use GemPy for standard structural geology with faults and
unconformities. Use LoopStructural when fold geometry is the primary control
on model architecture.
Stage 2b: Implicit Modelling with LoopStructural (alternative)
from LoopStructural import GeologicalModel
import pandas as pd
# Prepare input DataFrames
data = pd.DataFrame({
'X': x_coords, 'Y': y_coords, 'Z': z_coords,
'feature_name': formation_names,
'val': stratigraphic_values, # Scalar values for interface position'gx': gradient_x, 'gy': gradient_y, 'gz': gradient_z # Orientation
})
# Build model
model = GeologicalModel(
origin=[extent[0], extent[2], extent[4]],
maximum=[extent[1], extent[3], extent[5]]
)
model.data = data
# Add features
model.create_and_add_foliation('Stratigraphy', interpolatortype='FDI')
model.create_and_add_fault('MainFault', displacement=100)
# Update and access
model.update()
lithology = model.evaluate_model(model.regular_grid())
Stage 3: Visualization (pyvista)
import pyvista as pv
# GemPy model to PyVista
lith_block = sol.raw_arrays.lith_block
grid_3d = lith_block.reshape(geo_model.grid.regular_grid.resolution)
grid = pv.ImageData(dimensions=geo_model.grid.regular_grid.resolution)
grid.point_data['lithology'] = lith_block.flatten(order='F')
# 3D visualization with cross-section
plotter = pv.Plotter()
plotter.add_volume(grid, scalars='lithology', cmap='tab10', opacity='sigmoid')
sliced = grid.slice(normal='y', origin=grid.center)
plotter.add_mesh(sliced, scalars='lithology', cmap='tab10')
plotter.show()
# Export to VTK for external tools
grid.save('geological_model.vtk')
Common Pipelines
Standard 3D Geological Model
- [ ] Gather input data: geological map, DEM, borehole logs, structural measurements
- [ ] Load shapefiles and rasters with geopandas and rasterio
- [ ] Extract surface contact points with elevation using gemgis
- [ ] Extract orientation data (dip, azimuth) with gemgis
- [ ] Define model extent and resolution (cover data + buffer)
- [ ] Create GemPy GeoModel with extent and resolution
- [ ] Add surface points and orientations
- [ ] Define stratigraphic pile and structural relationships (ERODE, ONLAP)
- [ ] Add fault surfaces if present
- [ ] Set interpolator and compute model
- [ ] Validate with 2D cross-sections through known data points
- [ ] Visualize 3D result with pyvista
- [ ] Export to VTK or numpy for downstream use
Borehole-Based Model
- [ ] Load borehole data (collar, survey, lithology intervals)
- [ ] Convert lithology picks to surface contact points at formation boundaries
- [ ] Estimate orientations from multi-well dip calculation or assign regional dip
- [ ] Build model with GemPy (minimum 2 points + 1 orientation per surface)
- [ ] Validate: check model honours borehole intersections
- [ ] Iterate: add more data or adjust orientations to fix artifacts
GIS-to-Model Pipeline
- [ ] Load geological map polygons and structural measurements from shapefiles
- [ ] Reproject to common CRS with geopandas
- [ ] Extract formation boundary polylines from polygon contacts
- [ ] Sample points along polylines with gemgis
- [ ] Drape points onto DEM to get 3D coordinates
- [ ] Build GemPy model from extracted points and orientations
- [ ] Compare model surface traces with original geological map
When to Use
Use the geological modelling workflow when:
Building 3D geological models from surface mapping, boreholes, or GIS data
Converting GIS spatial data into implicit geological surfaces
Modelling faults, unconformities, or intrusions in 3D
Creating subsurface models for downstream geophysical or engineering use
Use individual domain skills when:
Only converting GIS data formats (use gemgis alone)
Only building a model with data already prepared (use gempy alone)
Only visualizing existing VTK meshes (use pyvista alone)
Common Issues
Issue
Solution
Model artifacts at edges
Extend model extent 10-20% beyond data coverage
GemPy needs min 2 points per surface
Add interpolated or projected points from known geology
Fault offset direction wrong
Reverse pole_vector or swap footwall/hangingwall points
CRS mismatch between datasets
Reproject all data to common projected CRS with geopandas
LoopStructural fold not honoured
Add fold axis orientation and wavelength constraints
Resolution too coarse
Increase grid resolution but watch memory (50^3 = 125k cells)